Inheritance: extends Doc
Exemple #1
0
 /**
  * Parse out inline tags from within a text string
  *
  * @param str text
  * @return Tag[]
  */
 function &_getInlineTags($text)
 {
     $return = NULL;
     $tagStrings = preg_split('/{(@.+)}/sU', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
     if ($tagStrings) {
         $inlineTags = NULL;
         $phpdoctor =& $this->_root->phpdoctor();
         foreach ($tagStrings as $tag) {
             if (substr($tag, 0, 1) == '@') {
                 $pos = strpos($tag, ' ');
                 if ($pos !== FALSE) {
                     $name = trim(substr($tag, 0, $pos));
                     $text = trim(substr($tag, $pos + 1));
                 } else {
                     $name = $tag;
                     $text = NULL;
                 }
             } else {
                 $name = '@text';
                 $text = $tag;
             }
             $data = NULL;
             $inlineTag =& $phpdoctor->createTag($name, $text, $data, $this->_root);
             $inlineTag->setParent($this->_parent);
             $inlineTags[] = $inlineTag;
         }
         $return =& $inlineTags;
     }
     return $return;
 }
Exemple #2
0
 /** Return the version of PHPDoctor.
  *
  * @return str
  */
 function version()
 {
     $phpdoctor =& $this->_rootDoc->phpdoctor();
     return $phpdoctor->version();
 }
Exemple #3
0
 /** Return this type as a class.
  *
  * @return ClassDoc A classDoc if the type is a class, null if it is a primitive type.
  */
 function &asClassDoc()
 {
     return $this->_root->classNamed($this->_name);
 }