1 | <?php |
||
49 | class ArrayDefinition extends AbstractArgsDefinition implements DefinitionInterface |
||
50 | { |
||
51 | /** |
||
52 | * The array |
||
53 | * @var array |
||
54 | */ |
||
55 | protected $array; |
||
56 | |||
57 | /** |
||
58 | * Constructor |
||
59 | * |
||
60 | * @param array<mixed> $array The PHP array |
||
61 | * @param array<mixed> $arguments List of arguments |
||
62 | * |
||
63 | * @return void |
||
|
|||
64 | */ |
||
65 | public function __construct($array, array $arguments = array()) |
||
70 | |||
71 | /** |
||
72 | * Calls $this->callable and return its value |
||
73 | * |
||
74 | * @param Container $container The Di Container |
||
75 | * @param null|string $name Name of the definition (if any) |
||
76 | * |
||
77 | * @return array<mixed> |
||
78 | */ |
||
79 | public function invoke(Container $container, $name = null) |
||
83 | |||
84 | /** |
||
85 | * Returns the array |
||
86 | * |
||
87 | * @return array<mixed> |
||
88 | */ |
||
89 | public function getArray() |
||
93 | |||
94 | /** |
||
95 | * Defines the array |
||
96 | * |
||
97 | * @param array<mixed> $array The callable function |
||
98 | * |
||
99 | * @return void |
||
100 | */ |
||
101 | public function setArray(array $array) |
||
105 | } |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.