Neos\Flow\ObjectManagement\Configuration\Configuration::getLifecycleShutdownMethodName PHP Method

getLifecycleShutdownMethodName() public method

Returns the name of the lifecycle shutdown method for this object
public getLifecycleShutdownMethodName ( ) : string
return string The name of the shutdown method
    public function getLifecycleShutdownMethodName()
    {
        return $this->lifecycleShutdownMethodName;
    }

Usage Example

 /**
  * Builds code which registers the lifecycle shutdown method, if any.
  *
  * @param Configuration $objectConfiguration
  * @return string
  */
 protected function buildLifecycleShutdownCode(Configuration $objectConfiguration)
 {
     $lifecycleShutdownMethodName = $objectConfiguration->getLifecycleShutdownMethodName();
     if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleShutdownMethodName)) {
         return '';
     }
     $className = $objectConfiguration->getClassName();
     $code = "\n" . '        if (get_class($this) === \'' . $className . '\') {' . "\n";
     $code .= '        \\Neos\\Flow\\Core\\Bootstrap::$staticObjectManager->registerShutdownObject($this, \'' . $lifecycleShutdownMethodName . '\');' . PHP_EOL;
     $code .= '        }' . "\n";
     return $code;
 }
All Usage Examples Of Neos\Flow\ObjectManagement\Configuration\Configuration::getLifecycleShutdownMethodName