public function createRequestToken(array $data = [])
    {
        $token = new RequestToken();

        if (array_key_exists('expires_at', $data)) {
            $token->setExpiresAt(new \DateTime($data['expires_at']));
        }

        if (array_key_exists('request_token', $data)) {
            $token->setToken($data['request_token']);
        }

        if (array_key_exists('success', $data)) {
            $token->setSuccess($data['success']);
        }

        return $token;
    }
public function createRequestToken(array $data = [])
    {
        $token = new RequestToken();

        if (array_key_exists('expires_at', $data)) {
            $token->setExpiresAt(new \DateTime($data['expires_at']));
        }

        if (array_key_exists('request_token', $data)) {
            $token->setToken($data['request_token']);
        }

        if (array_key_exists('success', $data)) {
            $token->setSuccess($data['success']);
        }

        return $token;
    }
public function createRequestToken ( array $ data = [ ] ) { $ token = new RequestToken ( ) ; if ( array_key_exists ( 'expires_at' , $ data ) ) { $ token -> setExpiresAt ( new \ DateTime ( $ data [ 'expires_at' ] ) ) ; } if ( array_key_exists ( 'request_token' , $ data ) ) { $ token -> setToken ( $ data [ 'request_token' ] ) ; } if ( array_key_exists ( 'success' , $ data ) ) { $ token -> setSuccess ( $ data [ 'success' ] ) ; } return $ token ; }
Create request token

@param  array        $data
@return RequestToken
Create request token