コード例 #1
0
 public function __construct($reflectionClass)
 {
     parent::__construct($reflectionClass);
     $this->classMagicElementExtractor = new ClassMagicElementsExtractor($this);
     $this->classTraitElementExtractor = new ClassTraitElementsExtractor($this, $reflectionClass);
     $this->parentClassElementExtractor = new ParentClassElementsExtractor($this);
 }
コード例 #2
0
 /**
  * Constructor.
  *
  * Sets the inspected class reflection.
  *
  * @param \TokenReflection\IReflectionClass $reflection Inspected class reflection
  * @param \ApiGen\Generator $generator ApiGen generator
  */
 public function __construct(IReflectionClass $reflection, Generator $generator)
 {
     parent::__construct($reflection, $generator);
     if (null === self::$methodAccessLevels) {
         self::$methodAccessLevels = 0;
         self::$propertyAccessLevels = 0;
         foreach (self::$config->accessLevels as $level) {
             switch (strtolower($level)) {
                 case 'public':
                     self::$methodAccessLevels |= InternalReflectionMethod::IS_PUBLIC;
                     self::$propertyAccessLevels |= InternalReflectionProperty::IS_PUBLIC;
                     break;
                 case 'protected':
                     self::$methodAccessLevels |= InternalReflectionMethod::IS_PROTECTED;
                     self::$propertyAccessLevels |= InternalReflectionProperty::IS_PROTECTED;
                     break;
                 case 'private':
                     self::$methodAccessLevels |= InternalReflectionMethod::IS_PRIVATE;
                     self::$propertyAccessLevels |= InternalReflectionProperty::IS_PRIVATE;
                     break;
                 default:
                     break;
             }
         }
     }
 }