Neos\Flow\Session\SessionInterface::isStarted PHP Метод

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

Tells if the session has been started already.
public isStarted ( ) : boolean
Результат boolean
    public function isStarted();

Usage Example

 /**
  * 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.
  *
  * @param JoinPointInterface $joinPoint The current join point
  * @return void
  * @fixme The pointcut expression below does not consider the options of the session annotation – needs adjustments in the AOP framework
  * @Flow\Before("methodAnnotatedWith(Neos\Flow\Annotations\Session)")
  */
 public function initializeSession(JoinPointInterface $joinPoint)
 {
     if ($this->session->isStarted() === true) {
         return;
     }
     $objectName = $this->objectManager->getObjectNameByClassName(get_class($joinPoint->getProxy()));
     $methodName = $joinPoint->getMethodName();
     $this->systemLogger->log(sprintf('Session initialization triggered by %s->%s.', $objectName, $methodName), LOG_DEBUG);
     $this->session->start();
 }
All Usage Examples Of Neos\Flow\Session\SessionInterface::isStarted