protected static function construct($fullClassName, array $arguments = [])
{
$fullClassName = ltrim($fullClassName, '\\');
if (!isset(self::$constructorInvocationsCache[$fullClassName])) {
$invocation = null;
$dynamicInit = AspectContainer::INIT_PREFIX . ':root';
try {
$joinPointsRef = new \ReflectionProperty($fullClassName, '__joinPoints');
$joinPointsRef->setAccessible(true);
$joinPoints = $joinPointsRef->getValue();
if (isset($joinPoints[$dynamicInit])) {
$invocation = $joinPoints[$dynamicInit];
}
} catch (\ReflectionException $e) {
$invocation = null;
}
if (!$invocation) {
$invocation = new ReflectionConstructorInvocation($fullClassName, 'root', []);
}
self::$constructorInvocationsCache[$fullClassName] = $invocation;
}
return self::$constructorInvocationsCache[$fullClassName]->__invoke($arguments);
}