public function __construct(\ReflectionParameter $parameter)
 {
     if (!$parameter->isCallable()) {
         throw new \InvalidArgumentException('Provided parameter should have a callable type hint');
     }
     parent::__construct($parameter);
 }
Beispiel #2
0
 public function __construct(\ReflectionParameter $parameter)
 {
     if ($parameter->getClass() === null) {
         throw new \InvalidArgumentException('Provided parameter should have a class type hint');
     }
     parent::__construct($parameter);
     $this->class_name = $parameter->getClass()->getName();
     $this->short_name = $parameter->getClass()->getShortName();
 }
 /**
  * constructor
  * @param string $name
  * @param mixed $value
  * @param string $operation
  * @return void
  */
 function __construct($name, $value, $operation)
 {
     $operationList = array('in' => 1, 'notin' => 1, 'not_in' => 1, 'between' => 1);
     if (isset($value) && isset($operationList[$operation]) && !is_array($value) && $value != '') {
         $value = str_replace(' ', '', $value);
         $value = str_replace('\'', '', $value);
         $value = explode(',', $value);
     }
     parent::__construct($name, $value);
     $this->operation = $operation;
 }
 /**
  * @param string $value
  * @param ArgumentList $argumentList
  */
 public function __construct(string $value, ArgumentList $argumentList)
 {
     parent::__construct($value);
     $this->argumentList = $argumentList;
 }
 public function __construct(string $name, string $validationRegex = null, ResolverInterface $resolver = null)
 {
     parent::__construct(false, $name, $validationRegex, $resolver);
 }