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());
        }
    }
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());
        }
    }
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 ( ) ) ; } }
Around advice, wrapping every method of a scope session object. It redirects
all method calls to the session object once there is one.

@param JoinPointInterface $joinPoint The current join point
@return mixed
@Flow\Around("filter(Neos\Flow\Session\Aspect\SessionObjectMethodsPointcutFilter)")
Around advice wrapping every method of a scope session object . It redirects all method calls to the session object once there is one .