Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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
01 <?php
02 /**
03 * Zend Framework (http://framework.zend.com/)
04 *
05 * @link http://github.com/zendframework/zf2 for the canonical source repository
06 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
07 * @license http://framework.zend.com/license/new-bsd New BSD License
08 */
09
10 namespace Zend\Code\Generator\DocBlock\Tag;
11
12 use Zend\Code\Generator\AbstractGenerator;
13 use Zend\Code\Generic\Prototype\PrototypeGenericInterface;
14
15 class GenericTag extends AbstractGenerator implements TagInterface, PrototypeGenericInterface
16 {
17 /**
18 * @var string
19 */
20 protected $name = null;
21
22 /**
23 * @var string
24 */
25 protected $content = null;
26
27 /**
28 * @param string $name
29 * @param string $content
30 */
31 public function __construct($name = null, $content = null)
32 {
33 if (!empty($name)) {
34 $this->setName($name);
35 }
36
37 if (!empty($content)) {
38 $this->setContent($content);
39 }
40 }
41
42 /**
43 * @param string $name
44 * @return GenericTag
45 */
46 public function setName($name)
47 {
48 $this->name = ltrim($name, '@');
49 return $this;
50 }
51
52 /**
53 * @return string
54 */
55 public function getName()
56 {
57 return $this->name;
58 }
59
60 /**
61 * @param string $content
62 * @return GenericTag
63 */
64 public function setContent($content)
65 {
66 $this->content = $content;
67 return $this;
68 }
69
70 /**
71 * @return string
72 */
73 public function getContent()
74 {
75 return $this->content;
76 }
77
78 /**
79 * @return string
80 */
81 public function generate()
82 {
83 $output = '@' . $this->name
84 . ((!empty($this->content)) ? ' ' . $this->content : '');
85
86 return $output;
87 }
88 }
89