Ejemplo n.º 1
0
 /**
  * @param IInjectionTarget $InjectionTarget
  * @param string $parameterName
  * @param Type $RequiredType
  */
 public function __construct(IInjectionTarget $InjectionTarget, $parameterName, Type $RequiredType)
 {
     $this->RequiredType = $RequiredType;
     $message = $RequiredType->getName() . ' is not defined as a service (means: has not been added to the ServiceDefinitions instance with the add() method). ';
     $message .= 'Each parameter of an injection target must have a defined service as type hint.';
     parent::__construct($InjectionTarget, $parameterName, $message);
 }
 /**
  * @param IInjectionTarget $InjectionTarget
  * @param string $parameterName
  */
 public function __construct(IInjectionTarget $InjectionTarget, $parameterName)
 {
     $message = 'The type hint is missing or not a class or interface name. Each parameter of an injection target must have an existing class or interface as type hint.';
     parent::__construct($InjectionTarget, $parameterName, $message);
 }
Ejemplo n.º 3
0
 /**
  * @param IInjectionTarget $InjectionTarget
  * @param string $parameterName
  */
 public function __construct(IInjectionTarget $InjectionTarget, $parameterName)
 {
     $message = 'The parameter is optional. A parameter of an injection target must not be optional.';
     parent::__construct($InjectionTarget, $parameterName, $message);
 }