Exemplo n.º 1
0
 /**
  * @param \pahanini\restdoc\models\ModelDoc $doc
  * @param string $methodName
  * @return bool
  */
 public function parseFields(ModelDoc $doc, $methodName)
 {
     if (!($docBlock = new DocBlock($this->reflection->getMethod($methodName)))) {
         return false;
     }
     $doc->populateTags($docBlock);
     if (DocBlockHelper::isInherit($docBlock)) {
         $parentParser = $this->getParentParser();
         $parentParser->parseFields($doc, $methodName);
     }
 }
 /**
  * @param $doc
  * @return bool
  */
 public function parseClass(ControllerDoc $doc)
 {
     if (!($docBlock = new DocBlock($this->reflection))) {
         return false;
     }
     $doc->longDescription = $docBlock->getLongDescription()->getContents();
     $doc->shortDescription = $docBlock->getShortDescription();
     $doc->populateTags($docBlock);
     if (DocBlockHelper::isInherit($docBlock)) {
         $parentParser = $this->getParentParser();
         $parentParser->parseClass($doc);
     }
 }