/**
  * @param   string  $function   this is the first argument of the original `\ReflectionParameter::__construct()`
  * @param   string  $parameter  this is the second argument of the original `\ReflectionParameter::__construct()`
  * @param   mixed   $value      the user value of the parameter
  * @throws  \Exception caught from parent constructor
  */
 public function __construct($function, $parameter, $value)
 {
     try {
         parent::__construct($function, $parameter);
     } catch (\Exception $e) {
         throw $e;
     }
     $this->value = $value;
     $this->type = gettype($value);
 }
示例#2
0
 /**
  * Constructor
  *
  * If called with a ReflectionParameter instance as second argument the,
  * first argument should be a string identifying the type of the parameter.
  * @param string|array<integer,string|object> $functionOrMethod
  *        The function, method or type of the parameter given as function
  *        name, array($classname, $method), or array($object, $method)
  * @param integer|string|ReflectionParameter $parameter
  *        Position (starting at 0), name, or ReflectionParameter instance
  *        of the parameter to introspect.
  * @param string $type
  *        Type of the parameter given in form of the type name.
  * @throws ReflectionException
  *         in case the given method or function does not exist.
  */
 public function __construct($functionOrMethod, $parameterPositionNameOrSource, $type = null)
 {
     if ($parameterPositionNameOrSource instanceof parent) {
         $this->parameter = $parameterPositionNameOrSource;
         // source
         $this->reflectionSource = $parameterPositionNameOrSource;
     } else {
         parent::__construct($functionOrMethod, $parameterPositionNameOrSource);
     }
     $this->type = ezcReflection::getTypeByName($type);
 }
 /**
  * Constructor.
  *
  * @param string|array                $function  Defining function/method
  * @param string                      $paramName Parameter name
  * @param \TokenReflection\Broker     $broker    Reflection broker
  * @param \ReflectionFunctionAbstract $parent    Parent reflection object
  */
 public function __construct($function, $paramName, Broker $broker, InternalReflectionFunctionAbstract $parent)
 {
     parent::__construct($function, $paramName);
     $this->broker = $broker;
     $this->userDefined = $parent->isUserDefined();
 }
 public function __construct($function, $parameter)
 {
     parent::__construct($this->function = $function, $parameter);
 }
 /**
  * The constructor, initializes the reflection parameter
  *
  * @param  string $functionName: Name of the function
  * @param  string $propertyName: Name of the property to reflect
  * @return void
  */
 public function __construct($function, $parameterName)
 {
     parent::__construct($function, $parameterName);
 }
示例#6
0
extends\ReflectionParameter{private$function;function
__construct($function,$parameter){parent::__construct($this->function=$function,$parameter);}function
 /**
  * Constructor
  *
  * @param string $function Name of the function to reflect parameters from
  * @param string $parameter The name of the parameter
  * @access public
  * @return void
  */
 public function __construct($function, $parameter)
 {
     parent::__construct($function, $parameter);
     $parser = new AnnotationParser($this->getDocComment());
     $this->annotations = $parser->getAnnotationArray();
 }
示例#8
0
 public function __construct(Method $method, $parameter, Reflection $reflection)
 {
     parent::__construct([$method->class, $method->name], $parameter);
     $this->method = $method;
     $this->reflection = $reflection;
 }