protected function createRequest($class, array $parameters)
    {
        if (!isset($parameters['credentials'])) {
            $parameters['credentials'] = new Credentials(array_intersect_key($this->getCredentialFields(), $parameters));
        }
        return new $class($parameters);
    }
protected function createRequest($class, array $parameters)
    {
        if (!isset($parameters['credentials'])) {
            $parameters['credentials'] = new Credentials(array_intersect_key($this->getCredentialFields(), $parameters));
        }
        return new $class($parameters);
    }
protected function createRequest ( $ class , array $ parameters ) { if ( ! isset ( $ parameters [ 'credentials' ] ) ) { $ parameters [ 'credentials' ] = new Credentials ( array_intersect_key ( $ this -> getCredentialFields ( ) , $ parameters ) ) ; } return new $ class ( $ parameters ) ; }
Initialize a request object

This function is usually used to initialise objects of type
BaseRequest (or a non-abstract subclass of it)
using existing parameters from this gateway.

If a client has been set on this class it will passed through,
allowing a mock guzzle client to be used for testing.

Example:

<code>
function myRequest($parameters) {
$this->createRequest('MyRequest', $parameters);
}
class MyRequest extends SilverpopBaseRequest {};

// Create the mailer
$mailer = Omnimail::create('Silverpop', $parameters);

// Create the request object
$myRequest = $mailer->myRequest($someParameters);
</code>

@param string $class The request class name
@param array $parameters

@return RequestInterface
Initialize a request object