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 |
LicenseTag.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-2016 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\Reflection\DocBlock\Tag;
11
12 use function preg_match;
13 use function trim;
14
15 class LicenseTag implements TagInterface
16 {
17 /**
18 * @var string
19 */
20 protected $url;
21
22 /**
23 * @var string
24 */
25 protected $licenseName;
26
27 /**
28 * @return string
29 */
30 public function getName()
31 {
32 return 'license';
33 }
34
35 /**
36 * Initializer
37 *
38 * @param string $tagDocblockLine
39 */
40 public function initialize($tagDocblockLine)
41 {
42 $match = [];
43
44 if (! preg_match('#^([\S]*)(?:\s+(.*))?$#m', $tagDocblockLine, $match)) {
45 return;
46 }
47
48 if ($match[1] !== '') {
49 $this->url = trim($match[1]);
50 }
51
52 if (isset($match[2]) && $match[2] !== '') {
53 $this->licenseName = $match[2];
54 }
55 }
56
57 /**
58 * @return null|string
59 */
60 public function getUrl()
61 {
62 return $this->url;
63 }
64
65 /**
66 * @return null|string
67 */
68 public function getLicenseName()
69 {
70 return $this->licenseName;
71 }
72
73 public function __toString()
74 {
75 return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . "\n";
76 }
77 }
78