1 | <?php |
||
19 | trait HasArguments |
||
20 | { |
||
21 | /** |
||
22 | * @var array|ArgumentDefinition[] |
||
23 | */ |
||
24 | protected $arguments = []; |
||
25 | |||
26 | /** |
||
27 | * @return iterable|ArgumentDefinition[] |
||
28 | */ |
||
29 | public function getArguments(): iterable |
||
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | * @return bool |
||
37 | */ |
||
38 | public function hasArgument(string $name): bool |
||
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @return null|ArgumentDefinitionInterface |
||
46 | */ |
||
47 | public function getArgument(string $name): ?ArgumentDefinitionInterface |
||
51 | |||
52 | /** |
||
53 | * @param ArgumentDefinitionInterface ...$arguments |
||
54 | * @return ProvidesArguments|$this |
||
55 | */ |
||
56 | 9 | public function withArgument(ArgumentDefinitionInterface ...$arguments): ProvidesArguments |
|
64 | |||
65 | /** |
||
66 | * @param string|ArgumentDefinitionInterface ...$arguments |
||
67 | * @return ProvidesArguments|$this |
||
68 | */ |
||
69 | public function withoutArgument(...$arguments) |
||
77 | } |
||
78 |