Neos\Flow\Session\Aspect\LazyLoadingAspect::callMethodOnOriginalSessionObject PHP Метод

callMethodOnOriginalSessionObject() публичный Метод

Around advice, wrapping every method of a scope session object. It redirects all method calls to the session object once there is one.
public callMethodOnOriginalSessionObject ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed
$joinPoint Neos\Flow\Aop\JoinPointInterface The current join point
Результат mixed
    public function callMethodOnOriginalSessionObject(JoinPointInterface $joinPoint)
    {
        $objectName = $this->objectManager->getObjectNameByClassName(get_class($joinPoint->getProxy()));
        $methodName = $joinPoint->getMethodName();
        $proxy = $joinPoint->getProxy();
        if (!isset($this->sessionOriginalInstances[$objectName])) {
            $this->sessionOriginalInstances[$objectName] = $this->objectManager->get($objectName);
        }
        if ($this->sessionOriginalInstances[$objectName] === $proxy) {
            return $joinPoint->getAdviceChain()->proceed($joinPoint);
        } else {
            return call_user_func_array([$this->sessionOriginalInstances[$objectName], $methodName], $joinPoint->getMethodArguments());
        }
    }