$arguments =
['...'
];
if ($callable instanceof Reference ||
$callable instanceof Definition
) { $callable =
[$callable, '__invoke'
];
} } if (\
is_string($callable) &&
str_starts_with($callable, '@='
)) { return $return.
sprintf('(($args = %s) ? (%s) : null)',
$this->
dumpValue(new ServiceLocatorArgument($definition->
getArguments())),
$this->
getExpressionLanguage()->
compile(substr($callable, 2
),
['container' => 'container', 'args' => 'args'
]) ).
$tail;
} if (!\
is_array($callable)) { return $return.
sprintf('%s(%s)',
$this->
dumpLiteralClass($this->
dumpValue($callable)),
$arguments ?
implode(', ',
$arguments) : ''
).
$tail;
} if (!
preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/',
$callable[1
])) { throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s).',
$callable[1
] ?: 'n/a'
));
}