LazyLoadingAspect
class LazyLoadingAspect (View source)
Adds the aspect of lazy loading to objects with scope session.
Properties
protected ObjectManagerInterface | $objectManager | ||
protected SessionManagerInterface | $sessionManager | ||
protected LoggerInterface | $logger | ||
protected array | $sessionOriginalInstances |
Methods
Injects the (system) logger based on PSR-3.
Registers an object of scope session.
Before advice for all methods annotated with "@Flow\Session(autoStart=true)".
Around advice, wrapping every method of a scope session object. It redirects all method calls to the session object once there is one.
Details
void
injectLogger(LoggerInterface $logger)
Injects the (system) logger based on PSR-3.
void
registerSessionInstance(string $objectName, object $object)
Registers an object of scope session.
void
initializeSession(JoinPointInterface $joinPoint)
Before advice for all methods annotated with "@Flow\Session(autoStart=true)".
Those methods will trigger a session initialization if a session does not exist yet.
mixed
callMethodOnOriginalSessionObject(JoinPointInterface $joinPoint)
Around advice, wrapping every method of a scope session object. It redirects all method calls to the session object once there is one.