当前位置: 首页>>代码示例>>PHP>>正文


PHP Tag::setContent方法代码示例

本文整理汇总了PHP中phpDocumentor\Reflection\DocBlock\Tag::setContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::setContent方法的具体用法?PHP Tag::setContent怎么用?PHP Tag::setContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpDocumentor\Reflection\DocBlock\Tag的用法示例。


在下文中一共展示了Tag::setContent方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     Tag::setContent($content);
     if (preg_match('/^
             # File component
             (?:
                 # File path in quotes
                 \\"([^\\"]+)\\"
                 |
                 # File URI
                 (\\S+)
             )
             # Remaining content (parsed by SourceTag)
             (?:\\s+(.*))?
         $/sux', $this->description, $matches)) {
         if ('' !== $matches[1]) {
             $this->setFilePath($matches[1]);
         } else {
             $this->setFileURI($matches[2]);
         }
         if (isset($matches[3])) {
             parent::setContent($matches[3]);
         } else {
             $this->setDescription('');
         }
         $this->content = $content;
     }
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:32,代码来源:ExampleTag.php

示例2: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     $parts = preg_split('/\\s+/Su', $this->description, 2);
     $this->link = $parts[0];
     $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]);
     $this->content = $content;
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:12,代码来源:LinkTag.php

示例3: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     $parts = preg_split('/\\s+/Su', $this->description, 2);
     // any output is considered a type
     $this->refers = $parts[0];
     $this->setDescription(isset($parts[1]) ? $parts[1] : '');
     $this->content = $content;
     return $this;
 }
开发者ID:cruni505,项目名称:prestomed,代码行数:13,代码来源:SeeTag.php

示例4: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     if (preg_match('/^(' . self::REGEX_AUTHOR_NAME . ')(\\<(' . self::REGEX_AUTHOR_EMAIL . ')\\>)?$/u', $this->description, $matches)) {
         $this->authorName = trim($matches[1]);
         if (isset($matches[3])) {
             $this->authorEmail = trim($matches[3]);
         }
     }
     return $this;
 }
开发者ID:qasem2rubik,项目名称:laravel,代码行数:14,代码来源:AuthorTag.php

示例5: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     Tag::setContent($content);
     // 1. none or more whitespace
     // 2. optionally the keyword "static" followed by whitespace
     // 3. optionally a word with underscores followed by whitespace : as
     //    type for the return value
     // 4. then optionally a word with underscores followed by () and
     //    whitespace : as method name as used by phpDocumentor
     // 5. then a word with underscores, followed by ( and any character
     //    until a ) and whitespace : as method name with signature
     // 6. any remaining text : as description
     if (preg_match('/^
             # Static keyword
             # Declates a static method ONLY if type is also present
             (?:
                 (static)
                 \\s+
             )?
             # Return type
             (?:
                 ([\\w\\|_\\\\]+)
                 \\s+
             )?
             # Legacy method name (not captured)
             (?:
                 [\\w_]+\\(\\)\\s+
             )?
             # Method name
             ([\\w\\|_\\\\]+)
             # Arguments
             \\(([^\\)]*)\\)
             \\s*
             # Description
             (.*)
         $/sux', $this->description, $matches)) {
         list(, $static, $this->type, $this->method_name, $this->arguments, $this->description) = $matches;
         if ($static) {
             if (!$this->type) {
                 $this->type = 'static';
             } else {
                 $this->isStatic = true;
             }
         } else {
             if (!$this->type) {
                 $this->type = 'void';
             }
         }
         $this->parsedDescription = null;
     } else {
         echo date('c') . ' ERR (3): @method contained invalid contents: ' . $this->content . PHP_EOL;
     }
     return $this;
 }
开发者ID:hilmysyarif,项目名称:l4-bootstrap-admin,代码行数:57,代码来源:MethodTag.php

示例6: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     $parts = preg_split('/\\s+/Su', $this->description, 3);
     if (count($parts) >= 2) {
         $this->parameter = $parts[0];
         $this->rightId = $parts[1];
     }
     $this->setDescription(isset($parts[2]) ? $parts[2] : '');
     $this->content = $content;
     return $this;
 }
开发者ID:oat-sa,项目名称:lib-tao-controllermap,代码行数:15,代码来源:RequiresRightTag.php

示例7: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     Tag::setContent($content);
     $parts = preg_split('/\\s+/Su', $this->description, 2);
     $tmp = explode('=', array_shift($parts));
     if (count($tmp) == 2) {
         $this->defaultValue = $tmp[1];
         $this->variableName = $tmp[0];
     } else {
         $this->variableName = $tmp[0];
     }
     $this->setDescription(join(' ', str_replace("\n", " ", $parts)));
     return $this;
 }
开发者ID:pahanini,项目名称:yii2-rest-doc,代码行数:17,代码来源:QueryTag.php

示例8: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     if (preg_match('/^
             # The version vector
             (' . self::REGEX_VECTOR . ')
             \\s*
             # The description
             (.+)?
         $/sux', $this->description, $matches)) {
         $this->version = $matches[1];
         $this->setDescription(isset($matches[2]) ? $matches[2] : '');
         $this->content = $content;
     }
     return $this;
 }
开发者ID:qasem2rubik,项目名称:laravel,代码行数:19,代码来源:VersionTag.php

示例9: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     Tag::setContent($content);
     $parts = preg_split('/(\\s+)/Su', $this->description, 3, PREG_SPLIT_DELIM_CAPTURE);
     // if the first item that is encountered is not a variable; it is a type
     if (isset($parts[0]) && strlen($parts[0]) > 0 && $parts[0][0] !== '$') {
         $this->type = array_shift($parts);
         array_shift($parts);
     }
     #print_p($parts);
     // if the next item starts with a $ it must be the variable name
     if (isset($parts[0]) && strlen($parts[0]) > 0 && $parts[0][0] == '$') {
         $this->variableName = array_shift($parts);
         array_shift($parts);
     }
     $this->setDescription(implode('', $parts));
     $this->content = $content;
     return $this;
 }
开发者ID:explodybits,项目名称:hookr-plugin,代码行数:22,代码来源:ParamTag.php

示例10: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     Tag::setContent($content);
     $parts = preg_split('/(\\s+)/Su', $this->description, 3, PREG_SPLIT_DELIM_CAPTURE);
     // if the first item that is encountered is not a variable; it is a type
     if (isset($parts[0]) && strlen($parts[0]) > 0 && $parts[0][0] !== '$') {
         $this->type = array_shift($parts);
         array_shift($parts);
     }
     // if the next item starts with a $ or ...$ it must be the variable name
     if (isset($parts[0]) && strlen($parts[0]) > 0 && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')) {
         $this->variableName = array_shift($parts);
         array_shift($parts);
         if (substr($this->variableName, 0, 3) === '...') {
             $this->isVariadic = true;
             $this->variableName = substr($this->variableName, 3);
         }
     }
     $this->setDescription(implode('', $parts));
     $this->content = $content;
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:25,代码来源:ParamTag.php

示例11: setContent

 /**
  * {@inheritdoc}
  */
 public function setContent($content)
 {
     parent::setContent($content);
     if (preg_match('/^
             # Starting line
             ([1-9]\\d*)
             \\s*
             # Number of lines
             (?:
                 ((?1))
                 \\s+
             )?
             # Description
             (.*)
         $/sux', $this->description, $matches)) {
         $this->startingLine = (int) $matches[1];
         if (isset($matches[2]) && '' !== $matches[2]) {
             $this->lineCount = (int) $matches[2];
         }
         $this->setDescription($matches[3]);
         $this->content = $content;
     }
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:27,代码来源:SourceTag.php


注:本文中的phpDocumentor\Reflection\DocBlock\Tag::setContent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。