Beispiel #1
0
 /**
  * Keys any modifier information we can glean from our reflection
  *
  * @access private
  * @param IReflection $context The context with which we want to analyze the reflection
  * @return void
  */
 private function keyModifiers($context)
 {
     if ($declaring_class = $this->reflection->getDeclaringClass()) {
         if ($declaring_class != $context) {
             $this->keys[] = 'inherited';
             $this->keys[] = 'external';
         }
     } elseif ($declaring_trait = $this->reflection->getDeclaringTrait()) {
         if ($declaring_trait != $context) {
             $this->keys[] = 'included';
             $this->keys[] = 'external';
         }
     }
     if ($this->type == self::TYPE_METHOD) {
         if ($this->reflection->isFinal()) {
             $this->keys[] = 'final';
         }
         if ($this->reflection->isAbstract()) {
             $this->keys[] = 'abstract';
         }
     }
     if ($this->reflection->isPublic()) {
         $this->keys[] = 'public';
     }
     if ($this->reflection->isPrivate()) {
         $this->keys[] = 'private';
     }
     if ($this->reflection->isProtected()) {
         $this->keys[] = 'protected';
     }
     if ($this->reflection->isStatic()) {
         $this->keys[] = 'static';
     } else {
         $this->keys[] = 'instance';
     }
 }