[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/zendframework/zend-code/src/Reflection/DocBlock/ -> TagManager.php (source)

   1  <?php
   2  /**
   3   * Zend Framework (http://framework.zend.com/)
   4   *
   5   * @link      http://github.com/zendframework/zf2 for the canonical source repository
   6   * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
   7   * @license   http://framework.zend.com/license/new-bsd New BSD License
   8   */
   9  
  10  namespace Zend\Code\Reflection\DocBlock;
  11  
  12  use Zend\Code\Generic\Prototype\PrototypeClassFactory;
  13  use Zend\Code\Reflection\DocBlock\Tag\TagInterface;
  14  
  15  class TagManager extends PrototypeClassFactory
  16  {
  17      /**
  18       * @return void
  19       */
  20      public function initializeDefaultTags()
  21      {
  22          $this->addPrototype(new Tag\ParamTag());
  23          $this->addPrototype(new Tag\ReturnTag());
  24          $this->addPrototype(new Tag\MethodTag());
  25          $this->addPrototype(new Tag\PropertyTag());
  26          $this->addPrototype(new Tag\AuthorTag());
  27          $this->addPrototype(new Tag\LicenseTag());
  28          $this->addPrototype(new Tag\ThrowsTag());
  29          $this->addPrototype(new Tag\VarTag());
  30          $this->setGenericPrototype(new Tag\GenericTag());
  31      }
  32  
  33      /**
  34       * @param string $tagName
  35       * @param string $content
  36       * @return TagInterface
  37       */
  38      public function createTag($tagName, $content = null)
  39      {
  40          /* @var TagInterface $newTag */
  41          $newTag = $this->getClonedPrototype($tagName);
  42  
  43          if ($content) {
  44              $newTag->initialize($content);
  45          }
  46  
  47          return $newTag;
  48      }
  49  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1