Omnipay\PayPal\RestGateway::createRequest PHP Метод

createRequest() публичный Метод

This overrides the parent createRequest function ensuring that the OAuth 2.0 access token is passed along with the request data -- unless the request is a RestTokenRequest in which case no token is needed. If no token is available then a new one is created (e.g. if there has been no token request or the current token has expired).
public createRequest ( string $class, array $parameters = [] ) : AbstractRestRequest
$class string
$parameters array
Результат Omnipay\PayPal\Message\AbstractRestRequest
    public function createRequest($class, array $parameters = array())
    {
        if (!$this->hasToken() && $class != '\\Omnipay\\PayPal\\Message\\RestTokenRequest') {
            // This will set the internal token parameter which the parent
            // createRequest will find when it calls getParameters().
            $this->getToken(true);
        }
        return parent::createRequest($class, $parameters);
    }