lib/TheTwelve/Foursquare/ApiGatewayFactory.php
public function getAuthenticationGateway(
        $authorizeUri, $accessTokenUri, $redirectUri
    ) {

        if (!$this->redirector instanceof Redirector) {
            throw new \RuntimeException("A Redirector is required for authentication");
        }

        $gateway = new AuthenticationGateway($this->httpClient, $this->redirector);
        $gateway->setAuthorizeUri($authorizeUri)
                ->setAccessTokenUri($accessTokenUri)
                ->setRedirectUri($redirectUri)
                ->setClientCredentials($this->clientId, $this->clientSecret);

        return $gateway;

    }
public function getAuthenticationGateway(
        $authorizeUri, $accessTokenUri, $redirectUri
    ) {

        if (!$this->redirector instanceof Redirector) {
            throw new \RuntimeException("A Redirector is required for authentication");
        }

        $gateway = new AuthenticationGateway($this->httpClient, $this->redirector);
        $gateway->setAuthorizeUri($authorizeUri)
                ->setAccessTokenUri($accessTokenUri)
                ->setRedirectUri($redirectUri)
                ->setClientCredentials($this->clientId, $this->clientSecret);

        return $gateway;

    }
public function getAuthenticationGateway ( $ authorizeUri , $ accessTokenUri , $ redirectUri ) { if ( ! $ this -> redirector instanceof Redirector ) { throw new \ RuntimeException ( "A Redirector is required for authentication" ) ; } $ gateway = new AuthenticationGateway ( $ this -> httpClient , $ this -> redirector ) ; $ gateway -> setAuthorizeUri ( $ authorizeUri ) -> setAccessTokenUri ( $ accessTokenUri ) -> setRedirectUri ( $ redirectUri ) -> setClientCredentials ( $ this -> clientId , $ this -> clientSecret ) ; return $ gateway ; }
factory method for authentication gateway
@param string $authorizeUri
@param string $accessTokenUri
@param string $redirectUri
@throws \RuntimeException
@return \TheTwelve\Foursquare\AuthenticationGateway
factory method for authentication gateway