class LazyLoadingAspect (View source)

Adds the aspect of lazy loading to objects with scope session.

Properties

protected $logger
protected $sessionOriginalInstances

Methods

__construct(ObjectManagerInterface $objectManager, SessionManagerInterface $sessionManager)

No description

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)".

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.

Details

__construct(ObjectManagerInterface $objectManager, SessionManagerInterface $sessionManager)

No description

Parameters

ObjectManagerInterface $objectManager
SessionManagerInterface $sessionManager

void registerSessionInstance(string $objectName, object $object)

Registers an object of scope session.

Parameters

string $objectName
object $object

Return Value

void

See also

ObjectManager

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.

Parameters

JoinPointInterface $joinPoint

Return Value

void

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.

Parameters

JoinPointInterface $joinPoint

Return Value

mixed