Source of file GenericTag.php
Size: 2,186 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Code\Reflection\DocBlock\Tag; use Zend\Code\Generic\Prototype\PrototypeGenericInterface; class GenericTag implements TagInterface, PrototypeGenericInterface { /** * @var string */ protected $name = null; /** * @var string */ protected $content = null; /** * @var null|string */ protected $contentSplitCharacter = null; /** * @var array */ protected $values = array(); /** * @param string $contentSplitCharacter */ public function __construct($contentSplitCharacter = ' ') { $this->contentSplitCharacter = $contentSplitCharacter; } /** * @param string $tagDocBlockLine * @return void */ public function initialize($tagDocBlockLine) { $this->parse($tagDocBlockLine); } /** * Get annotation tag name * * @return string */ public function getName() { return $this->name; } /** * @param string $name */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getContent() { return $this->content; } /** * @param int $position * @return string */ public function returnValue($position) { return $this->values[$position]; } /** * Serialize to string * * Required by Reflector * * @todo What should this do? * @return string */ public function __toString() { return 'DocBlock Tag [ * @' . $this->name . ' ]' . PHP_EOL; } /** * @param string $docBlockLine */ protected function parse($docBlockLine) { $this->content = trim($docBlockLine); $this->values = explode($this->contentSplitCharacter, $docBlockLine); } } |