Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
GenericTag.php
001 <?php
002 /**
003 * Zend Framework (http://framework.zend.com/)
004 *
005 * @link http://github.com/zendframework/zf2 for the canonical source repository
006 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
007 * @license http://framework.zend.com/license/new-bsd New BSD License
008 */
009
010 namespace Zend\Code\Reflection\DocBlock\Tag;
011
012 use Zend\Code\Generic\Prototype\PrototypeGenericInterface;
013
014 use function explode;
015 use function trim;
016
017 class GenericTag implements TagInterface, PrototypeGenericInterface
018 {
019 /**
020 * @var string
021 */
022 protected $name;
023
024 /**
025 * @var string
026 */
027 protected $content;
028
029 /**
030 * @var null|string
031 */
032 protected $contentSplitCharacter;
033
034 /**
035 * @var array
036 */
037 protected $values = [];
038
039 /**
040 * @param string $contentSplitCharacter
041 */
042 public function __construct($contentSplitCharacter = ' ')
043 {
044 $this->contentSplitCharacter = $contentSplitCharacter;
045 }
046
047 /**
048 * @param string $tagDocBlockLine
049 * @return void
050 */
051 public function initialize($tagDocBlockLine)
052 {
053 $this->parse($tagDocBlockLine);
054 }
055
056 /**
057 * Get annotation tag name
058 *
059 * @return string
060 */
061 public function getName()
062 {
063 return $this->name;
064 }
065
066 /**
067 * @param string $name
068 */
069 public function setName($name)
070 {
071 $this->name = $name;
072 }
073
074 /**
075 * @return string
076 */
077 public function getContent()
078 {
079 return $this->content;
080 }
081
082 /**
083 * @param int $position
084 * @return string
085 */
086 public function returnValue($position)
087 {
088 return $this->values[$position];
089 }
090
091 /**
092 * Serialize to string
093 *
094 * Required by Reflector
095 *
096 * @todo What should this do?
097 * @return string
098 */
099 public function __toString()
100 {
101 return 'DocBlock Tag [ * @' . $this->name . ' ]' . "\n";
102 }
103
104 /**
105 * @param string $docBlockLine
106 */
107 protected function parse($docBlockLine)
108 {
109 $this->content = trim($docBlockLine);
110 $this->values = explode($this->contentSplitCharacter, $docBlockLine);
111 }
112 }
113