Exemple #1
0
 /**
  * @param BaseInjectionTarget $InjectionTarget
  * @return object[]
  */
 private function getServicesToInject(IInjectionTarget $InjectionTarget)
 {
     $requiredTypes = $InjectionTarget->getRequiredTypes();
     $servicesToInject = [];
     foreach ($requiredTypes as $parameterName => $requestedType) {
         try {
             $Service = $this->ServiceFactory->getService($requestedType, $this);
         } catch (ServiceNotDefined $Exception) {
             throw new TypeHintIsNotADefinedService($InjectionTarget, $parameterName, $requestedType);
         }
         $servicesToInject[] = $Service;
     }
     return $servicesToInject;
 }
 /**
  * @return int
  */
 public function getLineNumber()
 {
     return $this->InjectionTarget->getLineNumber();
 }