src/AuthorizationServer.php
public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
    {
        if (is_null($identifier)) {
            $identifier = $grantType->getIdentifier();
        }

        // Inject server into grant
        $grantType->setAuthorizationServer($this);

        $this->grantTypes[$identifier] = $grantType;

        if (!is_null($grantType->getResponseType())) {
            $this->responseTypes[] = $grantType->getResponseType();
        }

        return $this;
    }
public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
    {
        if (is_null($identifier)) {
            $identifier = $grantType->getIdentifier();
        }

        // Inject server into grant
        $grantType->setAuthorizationServer($this);

        $this->grantTypes[$identifier] = $grantType;

        if (!is_null($grantType->getResponseType())) {
            $this->responseTypes[] = $grantType->getResponseType();
        }

        return $this;
    }
public function addGrantType ( GrantTypeInterface $ grantType , $ identifier = null ) { if ( is_null ( $ identifier ) ) { $ identifier = $ grantType -> getIdentifier ( ) ; } // Inject server into grant $ grantType -> setAuthorizationServer ( $ this ) ; $ this -> grantTypes [ $ identifier ] = $ grantType ; if ( ! is_null ( $ grantType -> getResponseType ( ) ) ) { $ this -> responseTypes [ ] = $ grantType -> getResponseType ( ) ; } return $ this ; }
Enable support for a grant

@param GrantTypeInterface $grantType  A grant class which conforms to Interface/GrantTypeInterface
@param null|string        $identifier An identifier for the grant (autodetected if not passed)

@return self
Enable support for a grant