コード例 #1
0
 /**
  * Helper method which parses the raw doc comment
  *
  * @param   string rawComment
  * @return  [:var]
  */
 protected function parseDetail($rawComment)
 {
     $tm = TagletManager::getInstance();
     $stripped = preg_replace('/[\\r\\n][\\s\\t]+\\* ?/', "\n", trim($rawComment, "/*\n\r\t "));
     $tagstart = FALSE === ($p = strpos($stripped, "\n@")) ? strlen($stripped) + 1 : $p;
     $detail = array('text' => substr($stripped, 0, $tagstart - 1), 'tags' => array());
     if ($t = strtok(trim(substr($stripped, $tagstart)), '@')) {
         do {
             list($kind, $rest) = explode(' ', trim($t), 2);
             if ($tag = $tm->make($this, $kind, trim($rest))) {
                 $detail['tags'][$kind][] = $tag;
             }
         } while ($t = strtok('@'));
     }
     return $detail;
 }
コード例 #2
0
 /**
  * Create a return tag for a given text
  *
  * @param   string text
  * @return  text.doclet.ReturnTag
  */
 protected function makeReturn($text)
 {
     return TagletManager::getInstance()->make($this->holder, 'return', $text);
 }
コード例 #3
0
 /**
  * Create a param tag for a given text
  *
  * @param   string text
  * @return  text.doclet.ParamTag
  */
 protected function makeParam($text)
 {
     return TagletManager::getInstance()->make($this->holder, 'param', $text);
 }
コード例 #4
0
 /**
  * Create a return tag for a given text
  *
  * @param   string text
  * @return  text.doclet.ReturnTag
  */
 protected function makeThrows($text)
 {
     return TagletManager::getInstance()->make($this->holder, 'throws', $text);
 }