1 | <?php declare(strict_types=1); |
||
19 | class ObjectSpec implements ObjectSpecInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $name; |
||
25 | /** |
||
26 | * @var PropertySpecInterface[]|FunctionSpecInterface[]|BindingSpecInterface[] |
||
27 | */ |
||
28 | private $properties = []; |
||
29 | /** |
||
30 | * @var null|FunctionSpecInterface |
||
31 | */ |
||
32 | private $function_spec; |
||
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | * @param PropertySpecInterface[]|FunctionSpecInterface[]|BindingSpecInterface[] $properties |
||
37 | * @param null|FunctionSpecInterface $function_spec |
||
38 | */ |
||
39 | public function __construct(string $name, array $properties, ?FunctionSpecInterface $function_spec = null) |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function getName(): string |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function getProperties(): array |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function hasProperty(string $name): bool |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getProperty(string $name) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function getFunctionSpec(): ?FunctionSpecInterface |
||
85 | } |
||
86 |