PHP Class Joli\SlackSecretSanta\Controller\SantaController

Exibir arquivo Open project: jolicode/slack-secret-santa

Public Methods

Method Description
__construct ( $slackClientId, $slackClientSecret, Symfony\Component\HttpFoundation\Session\SessionInterface $session, Symfony\Component\Routing\RouterInterface $router, Twig_Environment $twig )
authenticate ( Request $request ) : RedirectResponse | Response Ask for Slack authentication and store the AccessToken in Session.
finish ( Request $request, $hash )
homepage ( )
retry ( Request $request, $hash )
run ( Request $request )
summary ( Request $request, $hash )

Private Methods

Method Description
getApiClient ( League\OAuth2\Client\Token\AccessToken $token ) : CL\Slack\Transport\ApiClient
getSecretSantaOrThrow404 ( Request $request, string $hash ) : SecretSanta
getSecretSantaSessionKey ( string $hash ) : string
validate ( string[] $selectedUsers, string $message ) : array

Method Details

__construct() public method

public __construct ( $slackClientId, $slackClientSecret, Symfony\Component\HttpFoundation\Session\SessionInterface $session, Symfony\Component\Routing\RouterInterface $router, Twig_Environment $twig )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$router Symfony\Component\Routing\RouterInterface
$twig Twig_Environment

authenticate() public method

Ask for Slack authentication and store the AccessToken in Session.
public authenticate ( Request $request ) : RedirectResponse | Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\RedirectResponse | Symfony\Component\HttpFoundation\Response

finish() public method

public finish ( Request $request, $hash )
$request Symfony\Component\HttpFoundation\Request

homepage() public method

public homepage ( )

retry() public method

public retry ( Request $request, $hash )
$request Symfony\Component\HttpFoundation\Request

run() public method

public run ( Request $request )
$request Symfony\Component\HttpFoundation\Request

summary() public method

public summary ( Request $request, $hash )
$request Symfony\Component\HttpFoundation\Request