1 | <?php |
||
13 | class ScaleEngineCommandFactory extends ServiceDescriptionFactory |
||
14 | { |
||
15 | /** @type string The API secret used to sign requests. */ |
||
16 | private $_apiSecret; |
||
17 | |||
18 | /** |
||
19 | * Create the command factory for the ScaleEngine API requests. |
||
20 | * |
||
21 | * @param string $apiSecret The API secret used to sign requests. |
||
22 | * @param ServiceDescriptionInterface $description Service description. |
||
23 | * @param InflectorInterface $inflector Optional inflector to use if the |
||
24 | * command is not at first found. |
||
25 | */ |
||
26 | public function __construct( |
||
34 | |||
35 | /** |
||
36 | * Create a Guzzle command using the applied service description. |
||
37 | * |
||
38 | * Extends the command created by the default ServiceDescriptionFactory |
||
39 | * behavior with a request visitor that signs and encodes requests to |
||
40 | * ScaleEngine's API. |
||
41 | * |
||
42 | * @see \FloSports\ScaleEngine\Visitor\ScaleEngineRequestVisitor |
||
43 | * @param string $name The name of the command to create. |
||
44 | * @param array $args The parameters to the command. |
||
45 | * @return \Guzzle\Service\Command\CommandInterface|null The constructed |
||
46 | * command. |
||
47 | */ |
||
48 | public function factory($name, array $args = []) |
||
62 | } |
||
63 |