1 | <?php |
||
22 | class ArgumentDefinition extends AbstractDependentTypeDefinition implements ArgumentDefinitionInterface |
||
23 | { |
||
24 | use HasTypeIndication; |
||
25 | |||
26 | /** |
||
27 | * @var mixed |
||
28 | */ |
||
29 | protected $defaultValue; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | protected $hasDefaultValue = false; |
||
35 | |||
36 | /** |
||
37 | * ArgumentDefinition constructor. |
||
38 | * @param TypeDefinition $parent |
||
39 | * @param Document $document |
||
40 | * @param string $name |
||
41 | * @param string $type |
||
42 | */ |
||
43 | 9 | public function __construct(TypeDefinition $parent, Document $document, string $name, string $type) |
|
49 | |||
50 | /** |
||
51 | * @return TypeInterface |
||
52 | */ |
||
53 | public static function getType(): TypeInterface |
||
57 | |||
58 | /** |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function getDefaultValue() |
||
65 | |||
66 | /** |
||
67 | * @param mixed $value |
||
68 | * @return ArgumentDefinitionInterface|$this |
||
69 | */ |
||
70 | 9 | public function withDefaultValue($value): ArgumentDefinitionInterface |
|
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasDefaultValue(): bool |
||
85 | |||
86 | /** |
||
87 | * @return ArgumentDefinitionInterface |
||
88 | */ |
||
89 | public function withoutDefaultValue(): ArgumentDefinitionInterface |
||
96 | } |
||
97 |