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


PHP ReflectionClass::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructs a ReflectionClass
  * @link  http://php.net/manual/en/reflectionclass.construct.php
  *
  * @param mixed $argument <p>
  *                        Either a string containing the name of the class to
  *                        reflect, or an object.
  *                        </p>
  *
  * @since 5.0
  */
 public function __construct($argument)
 {
     parent::__construct($argument);
     foreach ($this->getProperties() as $property) {
         $this->propertyMap[$property->getName()] = $property;
     }
 }
开发者ID:tonirenner,项目名称:entity-service,代码行数:18,代码来源:ReflectionClass.php

示例2: __construct

 /**
  * @param mixed $class
  *
  * @throws \LogicException
  */
 public function __construct($class)
 {
     parent::__construct($class);
     foreach ($this->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflectionProperty) {
         $this->definitions[$reflectionProperty->getName()] = new Property($class, $reflectionProperty->getDocComment());
     }
 }
开发者ID:cawaphp,项目名称:module-swagger-server,代码行数:12,代码来源:Model.php

示例3: __construct

 /**
  * @param mixed $argument
  * @param IMapper|null $mapper
  */
 public function __construct($argument, IMapper $mapper = null)
 {
     parent::__construct($argument);
     $this->mapper = $mapper;
     $this->parseProperties();
     $this->initGettersAndSetters();
 }
开发者ID:tharos,项目名称:leanmapper,代码行数:11,代码来源:EntityReflection.php

示例4: __construct

 /**
  * ReflectionRegistration constructor.
  * @param mixed $argument
  * @throws InvalidRegistrationException
  */
 public function __construct($argument)
 {
     if (!is_subclass_of($argument, '\\OctoBroccoli\\ReflectionVariable\\ReflectionVariableInterface')) {
         throw new InvalidRegistrationException();
     }
     parent::__construct($argument);
 }
开发者ID:bozerkins,项目名称:octo-broccoli-json-reflector,代码行数:12,代码来源:ReflectionRegistration.php

示例5: strrpos

 function __construct($class)
 {
     is_string($class) && \Patchwork\Superloader::exists($class, false);
     // Do a lightweigh autoload
     parent::__construct($class);
     if (false !== ($parent = parent::getParentClass())) {
         $p = $parent->name;
         $top = $this->name;
         $i = strrpos($top, '__');
         if (false !== $i && isset($top[$i + 2]) && '' === trim(substr($top, $i + 2), '0123456789')) {
             $this->isTop = false;
             $top = substr($top, 0, $i);
         }
         $top .= '__';
         $i = strlen($top);
         while (isset($p[$i]) && $top === rtrim($p, '0123456789')) {
             $this->superStack[] = $parent;
             if (false === ($parent = $parent->getParentClass())) {
                 break;
             }
             $p = $parent->name;
         }
         $this->superParent = $parent;
     }
 }
开发者ID:nicolas-grekas,项目名称:Patchwork-sandbox,代码行数:25,代码来源:ReflectionClass.php

示例6: __construct

 /**
  * [__construct description]
  * @param [type] $testsClass [description]
  */
 public function __construct($testsClass, array $constructor_args = null)
 {
     $this->forceCLI();
     parent::__construct($testsClass);
     $this->constructor_args = $constructor_args;
     $this->init();
 }
开发者ID:shgysk8zer0,项目名称:core,代码行数:11,代码来源:unit_test.php

示例7: __construct

 /**
  * Constructs a new ReflectionClass object.
  *
  * @param string|object $class
  * @throws ReflectionException
  * @return ReflectionClass
  */
 public final function __construct($class)
 {
     $bt = debug_backtrace();
     if (!isset($bt[1]['class']) || $bt[1]['class'] !== __CLASS__) {
         throw new ReflectionException('ReflectionClass\' constructor cannot be called from outside the class');
     }
     parent::__construct($class);
 }
开发者ID:mseshachalam,项目名称:reflection,代码行数:15,代码来源:ReflectionClass.php

示例8: rebuild

	/**
	 * Change the present class to be able to use reflection on it.
	 *
	 * @param string $name
	 * @return bool True if success
	 */
	public function rebuild($name) {
		try {
			parent::__construct($name);
			return true;
		} catch(Exception $e) {
			return false;
		}
	}
开发者ID:nyroDev,项目名称:nyroFwk,代码行数:14,代码来源:nReflection.class.php

示例9: __construct

 public function __construct($object)
 {
     if (!is_object($object)) {
         throw new \InvalidArgumentException(sprintf('Expected "object", got "%s".', gettype($object)));
     }
     parent::__construct($object);
     $this->object = $object;
 }
开发者ID:YepFoundation,项目名称:reflection,代码行数:8,代码来源:ReflectionClass.php

示例10: __construct

 public function __construct($class)
 {
     parent::__construct($class);
     $this->annotations = array();
     $this->annotations["class"] = array();
     $this->annotations["properties"] = array();
     $this->extractAnnotations();
 }
开发者ID:BGCX067,项目名称:fajax-svn-to-git,代码行数:8,代码来源:class.AnnotationClass.php

示例11: __construct

 /**
  * Constructor
  *
  * @access public
  * @param mixed $class
  * @param string $relative
  */
 public function __construct($class, $relative)
 {
     parent::__construct($class);
     if (!is_string($relative)) {
         throw new \InvalidArgumentException('The second parameter specifying the relative position of the class must be a string.');
     }
     $this->relative = trim(preg_replace('#/{2,}#', '/', strtr($relative, '\\', '/')), '/');
 }
开发者ID:darsyn,项目名称:class-finder,代码行数:15,代码来源:ReflectionClass.php

示例12: __construct

 /**
  * __construct(\Zend\ServiceManager\ServiceManager $ServiceManager) 
  * @param \Zend\ServiceManager\ServiceManager $ServiceManager
  * @return instance of ServiceManager, Provider Configuration
  * 
  */
 public function __construct(\Zend\ServiceManager\ServiceManager $ServiceManager)
 {
     parent::__construct(__CLASS__);
     // set ServiceManager throught constructor
     if (null === $this->_sm) {
         $this->_sm = $ServiceManager;
     }
     $this->__config = $this->_sm->get('Config')["Submissions\\Provider\\Config"][$this->getShortName()];
 }
开发者ID:Primetron,项目名称:Edusoft,代码行数:15,代码来源:BulkSMS.php

示例13: __construct

 /**
  * Called when the object is constructed
  *
  * @param   object  $instance  the instance to refract
  * @return  self
  * @throws  InvalidArgumentException  if $instance is not an object
  * @since   0.1.0
  */
 public function __construct($instance)
 {
     if (!is_object($instance)) {
         throw new \InvalidArgumentException(__METHOD__ . "() expects parameter one, instance, to be an object");
     }
     parent::__construct($instance);
     $this->instance = $instance;
     return;
 }
开发者ID:jstewmc,项目名称:refraction,代码行数:17,代码来源:RefractionClass.php

示例14: __construct

 /**
  * Constructs a new ezcReflectionClass object.
  *
  * @param string|object|ReflectionClass $argument
  *        Name, instance or ReflectionClass object of the class to be
  *        reflected
  * @throws ReflectionException if the specified class doesn't exist
  */
 public function __construct($argument)
 {
     if (!$argument instanceof parent) {
         parent::__construct($argument);
     }
     $this->reflectionSource = $argument;
     // TODO: Parse comment on demand to save CPU time and memory
     $this->docParser = ezcReflection::getDocCommentParser();
     $this->docParser->parse($this->getDocComment());
 }
开发者ID:zetacomponents,项目名称:reflection,代码行数:18,代码来源:class.php

示例15: __construct

 /**
  * Constructor
  *
  * Instantiate the code reflection object
  *
  * @param  mixed $class
  * @return Reflection
  */
 public function __construct($class)
 {
     if (is_string($class)) {
         $this->classString = $class;
     } else {
         $this->objectInstance = $class;
         $this->classString = get_class($class);
     }
     parent::__construct($class);
     $this->buildGenerator();
 }
开发者ID:Nnadozieomeonu,项目名称:lacecart,代码行数:19,代码来源:Reflection.php


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