Neos\Flow\ObjectManagement\ObjectManagerInterface::isRegistered PHP 메소드

isRegistered() 공개 메소드

Returns TRUE if an object with the given name has already been registered.
부터: 1.0.0 alpha 8
public isRegistered ( string $objectName ) : boolean
$objectName string Name of the object
리턴 boolean TRUE if the object has been registered, otherwise FALSE
    public function isRegistered($objectName);

Usage Example

예제 #1
0
 /**
  * Handle an Exception thrown while rendering TypoScript according to
  * settings specified in Neos.Fusion.rendering.exceptionHandler
  *
  * @param array $typoScriptPath
  * @param \Exception $exception
  * @param boolean $useInnerExceptionHandler
  * @return string
  * @throws InvalidConfigurationException
  */
 public function handleRenderingException($typoScriptPath, \Exception $exception, $useInnerExceptionHandler = false)
 {
     $typoScriptConfiguration = $this->getConfigurationForPath($typoScriptPath);
     if (isset($typoScriptConfiguration['__meta']['exceptionHandler'])) {
         $exceptionHandlerClass = $typoScriptConfiguration['__meta']['exceptionHandler'];
         $invalidExceptionHandlerMessage = 'The class "%s" is not valid for property "@exceptionHandler".';
     } else {
         if ($useInnerExceptionHandler === true) {
             $exceptionHandlerClass = $this->settings['rendering']['innerExceptionHandler'];
         } else {
             $exceptionHandlerClass = $this->settings['rendering']['exceptionHandler'];
         }
         $invalidExceptionHandlerMessage = 'The class "%s" is not valid for setting "Neos.Fusion.rendering.exceptionHandler".';
     }
     $exceptionHandler = null;
     if ($this->objectManager->isRegistered($exceptionHandlerClass)) {
         $exceptionHandler = $this->objectManager->get($exceptionHandlerClass);
     }
     if ($exceptionHandler === null || !$exceptionHandler instanceof AbstractRenderingExceptionHandler) {
         $message = sprintf($invalidExceptionHandlerMessage . "\n" . 'Please specify a fully qualified classname to a subclass of %2$s\\AbstractRenderingExceptionHandler.' . "\n" . 'You might implement an own handler or use one of the following:' . "\n" . '%2$s\\AbsorbingHandler' . "\n" . '%2$s\\HtmlMessageHandler' . "\n" . '%2$s\\PlainTextHandler' . "\n" . '%2$s\\ThrowingHandler' . "\n" . '%2$s\\XmlCommentHandler', $exceptionHandlerClass, 'Neos\\Fusion\\Core\\ExceptionHandlers');
         throw new InvalidConfigurationException($message, 1368788926);
     }
     $exceptionHandler->setRuntime($this);
     if (array_key_exists('__objectType', $typoScriptConfiguration)) {
         $typoScriptPath .= sprintf('<%s>', $typoScriptConfiguration['__objectType']);
     }
     $output = $exceptionHandler->handleRenderingException($typoScriptPath, $exception);
     return $output;
 }
All Usage Examples Of Neos\Flow\ObjectManagement\ObjectManagerInterface::isRegistered