mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-20 05:13:42 -07:00
spaces.php
This commit is contained in:
parent
7755490b81
commit
eefa32741e
845 changed files with 50409 additions and 0 deletions
62
aws/Aws/Command.php
Normal file
62
aws/Aws/Command.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
namespace Aws;
|
||||
|
||||
/**
|
||||
* AWS command object.
|
||||
*/
|
||||
class Command implements CommandInterface
|
||||
{
|
||||
use HasDataTrait;
|
||||
|
||||
/** @var string */
|
||||
private $name;
|
||||
|
||||
/** @var HandlerList */
|
||||
private $handlerList;
|
||||
|
||||
/**
|
||||
* Accepts an associative array of command options, including:
|
||||
*
|
||||
* - @http: (array) Associative array of transfer options.
|
||||
*
|
||||
* @param string $name Name of the command
|
||||
* @param array $args Arguments to pass to the command
|
||||
* @param HandlerList $list Handler list
|
||||
*/
|
||||
public function __construct($name, array $args = [], HandlerList $list = null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->data = $args;
|
||||
$this->handlerList = $list ?: new HandlerList();
|
||||
|
||||
if (!isset($this->data['@http'])) {
|
||||
$this->data['@http'] = [];
|
||||
}
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
$this->handlerList = clone $this->handlerList;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function hasParam($name)
|
||||
{
|
||||
return array_key_exists($name, $this->data);
|
||||
}
|
||||
|
||||
public function getHandlerList()
|
||||
{
|
||||
return $this->handlerList;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
public function get($name)
|
||||
{
|
||||
return $this[$name];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue