1 | <?php namespace nyx\console; |
||
13 | abstract class Input implements interfaces\Input |
||
14 | { |
||
15 | /** |
||
16 | * @var input\formats\interfaces\Tokens The raw, unmapped and not validated input Tokens. |
||
17 | */ |
||
18 | protected $raw; |
||
19 | |||
20 | /** |
||
21 | * @var input\parameter\values\Arguments The Input Arguments collection. |
||
22 | */ |
||
23 | private $arguments; |
||
24 | |||
25 | /** |
||
26 | * @var input\parameter\values\Options The Input Options collection. |
||
27 | */ |
||
28 | private $options; |
||
29 | |||
30 | /** |
||
31 | * Parses the raw Tokens into usable Input Arguments and Options. |
||
32 | * |
||
33 | * @return $this |
||
34 | */ |
||
35 | abstract protected function parse() : Input; |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function bind(input\Definition $definition) : interfaces\Input |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function raw() : input\formats\interfaces\Tokens |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function arguments() : ?input\parameter\values\Arguments |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function options() : ?input\parameter\values\Options |
||
76 | |||
77 | /** |
||
78 | * Magic getter. |
||
79 | * |
||
80 | * @param string $property The name of the property whose value is being requested. |
||
81 | * @return mixed |
||
82 | * @throws \DomainException When the requested property does not exist or is not accessible. |
||
83 | */ |
||
84 | public function __get(string $property) |
||
94 | |||
95 | /** |
||
96 | * Magic isset. |
||
97 | * |
||
98 | * @param string $property The name of the property whose existence we are checking. |
||
99 | * @return bool True when the property is set, false otherwise and when it is not accessible. |
||
100 | */ |
||
101 | public function __isset(string $property) : bool |
||
110 | } |
||
111 |