exitIfSiteLocked() public method

Exits if the site is currently locked
public exitIfSiteLocked ( ) : void
return void
コード例 #1
0
 /**
  * @test
  */
 public function exitIfSiteLockedDoesNotExitIfSiteIsNotLocked()
 {
     $this->lockManager->unlockSite();
     $this->lockManager->expects($this->never())->method('doExit');
     $this->lockManager->exitIfSiteLocked();
 }
コード例 #2
0
ファイル: Bootstrap.php プロジェクト: neos/flow
 /**
  * Builds a boot sequence with the minimum modules necessary for both, compiletime
  * and runtime.
  *
  * @param string $identifier
  * @return Sequence
  * @api
  */
 public function buildEssentialsSequence($identifier)
 {
     $sequence = new Sequence($identifier);
     if ($this->context->isProduction()) {
         $lockManager = new LockManager();
         $lockManager->exitIfSiteLocked();
         if ($identifier === 'compiletime') {
             $lockManager->lockSiteOrExit();
             // make sure the site is unlocked even if the script ends unexpectedly due to an error/exception
             register_shutdown_function([$lockManager, 'unlockSite']);
         }
         $this->setEarlyInstance(LockManager::class, $lockManager);
     }
     $sequence->addStep(new Step('neos.flow:annotationregistry', [Scripts::class, 'registerClassLoaderInAnnotationRegistry']));
     $sequence->addStep(new Step('neos.flow:configuration', [Scripts::class, 'initializeConfiguration']), 'neos.flow:annotationregistry');
     $sequence->addStep(new Step('neos.flow:systemlogger', [Scripts::class, 'initializeSystemLogger']), 'neos.flow:configuration');
     $sequence->addStep(new Step('neos.flow:errorhandling', [Scripts::class, 'initializeErrorHandling']), 'neos.flow:systemlogger');
     $sequence->addStep(new Step('neos.flow:cachemanagement', [Scripts::class, 'initializeCacheManagement']), 'neos.flow:systemlogger');
     return $sequence;
 }