Ejemplo n.º 1
0
 /**
  * Builds code which registers the lifecycle shutdown method, if any.
  *
  * @param \TYPO3\FLOW3\Object\Configuration\Configuration $objectConfiguration
  * @return string
  */
 protected function buildLifecycleShutdownCode(\TYPO3\FLOW3\Object\Configuration\Configuration $objectConfiguration)
 {
     $lifecycleShutdownMethodName = $objectConfiguration->getLifecycleShutdownMethodName();
     if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleShutdownMethodName)) {
         return '';
     }
     return "\n" . '		\\TYPO3\\FLOW3\\Core\\Bootstrap::$staticObjectManager->registerShutdownObject($this, \'' . $lifecycleShutdownMethodName . '\');' . PHP_EOL;
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function theDefaultFactoryMethodNameIsCreate()
 {
     $this->assertSame('create', $this->objectConfiguration->getFactoryMethodName());
 }