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

public getConstructorInjection ( ) : DI\Definition\ObjectDefinition\MethodInjection | null
Результат DI\Definition\ObjectDefinition\MethodInjection | null
Пример #1
0
 private function dumpConstructor($className, ObjectDefinition $definition)
 {
     $str = '';
     $constructorInjection = $definition->getConstructorInjection();
     if ($constructorInjection !== null) {
         $parameters = $this->dumpMethodParameters($className, $constructorInjection);
         $str .= sprintf(PHP_EOL . "    __construct(" . PHP_EOL . "        %s" . PHP_EOL . "    )", $parameters);
     }
     return $str;
 }
Пример #2
0
 private function mergeConstructorInjection(ObjectDefinition $definition)
 {
     if ($definition->getConstructorInjection() !== null) {
         if ($this->constructorInjection !== null) {
             // Merge
             $this->constructorInjection->merge($definition->getConstructorInjection());
         } else {
             // Set
             $this->constructorInjection = $definition->getConstructorInjection();
         }
     }
 }