Exemplo n.º 1
0
 /**
  * Adds a new property to the class using an array of tokens.
  *
  * @param ClassReflection $class       Class reflection
  * @param string          $propertyTag Property tag contents
  *
  * @return bool
  */
 protected function injectProperty(ClassReflection $class, $propertyTag)
 {
     if (!($data = $this->parseProperty($propertyTag))) {
         return false;
     }
     $property = new PropertyReflection($data['name'], $class->getLine());
     $property->setDocComment($data['description']);
     $property->setShortDesc($data['description']);
     if (isset($data['hint'])) {
         $property->setHint(array(array($data['hint'], null)));
     }
     $class->addProperty($property);
     return true;
 }