1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-25 18:43:22 +01:00
guzzle/tests/Guzzle/Tests/Mock/CustomResponseModel.php
Michael Dowling a2ee43c186 Adding support in Guzzle to instantiate custom responseType="class"
responseClass objects by implementing ResponseClassInterface.
Closes #248.
2013-03-03 11:55:58 -08:00

22 lines
423 B
PHP

<?php
namespace Guzzle\Tests\Mock;
use Guzzle\Service\Command\ResponseClassInterface;
use Guzzle\Service\Command\OperationCommand;
class CustomResponseModel implements ResponseClassInterface
{
public $command;
public static function fromCommand(OperationCommand $command)
{
return new self($command);
}
public function __construct($command)
{
$this->command = $command;
}
}