コード例 #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);
     }
 }
コード例 #2
0
 /**
  * Prepares doc
  */
 public function prepare()
 {
     parent::prepare();
     foreach ($this->getTagsByName('label') as $tag) {
         $this->_labels[$tag->getContent()] = true;
     }
     $this->query = $this->getTagsByName('query');
     if ($this->model) {
         $this->model->prepare();
     }
 }