当前位置: 首页>>代码示例>>PHP>>正文


PHP ReflectionParameter::__construct方法代码示例

本文整理汇总了PHP中ReflectionParameter::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ReflectionParameter::__construct方法的具体用法?PHP ReflectionParameter::__construct怎么用?PHP ReflectionParameter::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReflectionParameter的用法示例。


在下文中一共展示了ReflectionParameter::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @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);
 }
开发者ID:atelierspierrot,项目名称:reflectors,代码行数:16,代码来源:ReflectionParameterValue.php

示例2: __construct

 /**
  * 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);
 }
开发者ID:zetacomponents,项目名称:reflection,代码行数:27,代码来源:parameter.php

示例3: __construct

 /**
  * 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();
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:14,代码来源:ReflectionParameter.php

示例4: __construct

 public function __construct($function, $parameter)
 {
     parent::__construct($this->function = $function, $parameter);
 }
开发者ID:JPalounek,项目名称:IconStore,代码行数:4,代码来源:ParameterReflection.php

示例5: __construct

 /**
  * 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);
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:11,代码来源:ParameterReflection.php

示例6:

extends\ReflectionParameter{private$function;function
__construct($function,$parameter){parent::__construct($this->function=$function,$parameter);}function
开发者ID:JanTvrdik,项目名称:NetteExtras,代码行数:2,代码来源:loader.php

示例7: __construct

 /**
  * 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();
 }
开发者ID:mattrwallace,项目名称:exegesis,代码行数:14,代码来源:annotationparameter.php

示例8: __construct

 public function __construct(Method $method, $parameter, Reflection $reflection)
 {
     parent::__construct([$method->class, $method->name], $parameter);
     $this->method = $method;
     $this->reflection = $reflection;
 }
开发者ID:spotframework,项目名称:spot,代码行数:6,代码来源:Parameter.php


注:本文中的ReflectionParameter::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。