| Línea 35... |
Línea 35... |
| 35 |
* @param string $name The definition name.
|
35 |
* @param string $name The definition name.
|
| 36 |
* @param string[] $wildcardsReplacements Replacements for wildcard definitions.
|
36 |
* @param string[] $wildcardsReplacements Replacements for wildcard definitions.
|
| 37 |
*
|
37 |
*
|
| 38 |
* @throws InvalidDefinition
|
38 |
* @throws InvalidDefinition
|
| 39 |
*/
|
39 |
*/
|
| 40 |
public function normalizeRootDefinition(mixed $definition, string $name, array $wildcardsReplacements = null) : Definition
|
40 |
public function normalizeRootDefinition(mixed $definition, string $name, ?array $wildcardsReplacements = null) : Definition
|
| 41 |
{
|
41 |
{
|
| 42 |
if ($definition instanceof DefinitionHelper) {
|
42 |
if ($definition instanceof DefinitionHelper) {
|
| 43 |
$definition = $definition->getDefinition($name);
|
43 |
$definition = $definition->getDefinition($name);
|
| 44 |
} elseif (is_array($definition)) {
|
44 |
} elseif (is_array($definition)) {
|
| 45 |
$definition = new ArrayDefinition($definition);
|
45 |
$definition = new ArrayDefinition($definition);
|