Total Complexity | 7 |
Total Lines | 94 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class Argument |
||
22 | { |
||
23 | |||
24 | // |
||
25 | // PRIVATE PROPERTIES |
||
26 | // |
||
27 | |||
28 | /** @var string Text that uniquly identifies this Argument */ |
||
29 | private $key = null; |
||
30 | |||
31 | /** @var mixed Data that represents this Arguments value */ |
||
32 | private $value = null; |
||
33 | |||
34 | // |
||
35 | // PUBLIC METHODS |
||
36 | // |
||
37 | |||
38 | /** |
||
39 | * Contructs a new Argument with the specified key and value |
||
40 | * |
||
41 | * @since 1.0.0 |
||
42 | */ |
||
43 | public function __construct($key=null, $value=null) |
||
44 | { |
||
45 | $this->key = $key; |
||
46 | $this->value = $value; |
||
47 | } |
||
48 | |||
49 | // GETTERS/SETTERS |
||
50 | |||
51 | /** |
||
52 | * Retrieves the text 'key' that identifies this Argument |
||
53 | * |
||
54 | * @since 1.0.0 |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getKey() |
||
59 | { |
||
60 | return $this->key; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * Retrieves the data 'value' that belongs to this Argument |
||
65 | * |
||
66 | * @since 1.0.0 |
||
67 | * |
||
68 | * @return mixed The data value of this Argument |
||
69 | */ |
||
70 | public function getValue() |
||
71 | { |
||
72 | return $this->value; |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Sets the text 'key' that indentifies this Argument |
||
77 | * |
||
78 | * @since 1.0.0 |
||
79 | * |
||
80 | * @param string $key |
||
81 | */ |
||
82 | public function setKey(string $key) |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * Sets the data 'value' for this Argument |
||
89 | * |
||
90 | * @since 1.0.0 |
||
91 | * |
||
92 | * @param mixed $value |
||
93 | */ |
||
94 | public function setValue($value) |
||
95 | { |
||
96 | $this->value = $value; |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * Returns TRUE when this Arguments 'value' is an array |
||
101 | * |
||
102 | * @since 1.0.0 |
||
103 | * |
||
104 | * @return boolean |
||
105 | */ |
||
106 | public function isArray() |
||
115 | } |
||
116 | } |
||
117 | |||
118 | } |