PluginProbe
Media Cloud Sync / 1.2.12
Media Cloud Sync v1.2.12
1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 All 34 releases
media-cloud-sync / includes / sdk / s3 / Aws / Command.php

Command.php in Media Cloud Sync 1.2.12, at includes/sdk/s3/Aws/Command.php

58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Dudlewebs\WPMCS\s3\Aws;
4
5 /**
6 * AWS command object.
7 */
8 class Command implements CommandInterface
9 {
10 use HasDataTrait;
11 /** @var string */
12 private $name;
13 /** @var HandlerList */
14 private $handlerList;
15 /**
16 * Accepts an associative array of command options, including:
17 *
18 * - @http: (array) Associative array of transfer options.
19 *
20 * @param string $name Name of the command
21 * @param array $args Arguments to pass to the command
22 * @param HandlerList $list Handler list
23 */
24 public function __construct($name, array $args = [], HandlerList $list = null)
25 {
26 $this->name = $name;
27 $this->data = $args;
28 $this->handlerList = $list ?: new HandlerList();
29 if (!isset($this->data['@http'])) {
30 $this->data['@http'] = [];
31 }
32 if (!isset($this->data['@context'])) {
33 $this->data['@context'] = [];
34 }
35 }
36 public function __clone()
37 {
38 $this->handlerList = clone $this->handlerList;
39 }
40 public function getName()
41 {
42 return $this->name;
43 }
44 public function hasParam($name)
45 {
46 return \array_key_exists($name, $this->data);
47 }
48 public function getHandlerList()
49 {
50 return $this->handlerList;
51 }
52 /** @deprecated */
53 public function get($name)
54 {
55 return $this[$name];
56 }
57 }
58