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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ParamTag.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 1.90 KiB


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\Reflection\DocBlock\Tag;
11   
12  class ParamTag implements TagInterface, PhpDocTypedTagInterface
13  {
14      /**
15       * @var array
16       */
17      protected $types = array();
18   
19      /**
20       * @var string
21       */
22      protected $variableName = null;
23   
24      /**
25       * @var string
26       */
27      protected $description = null;
28   
29      /**
30       * @return string
31       */
32      public function getName()
33      {
34          return 'param';
35      }
36   
37      /**
38       * Initializer
39       *
40       * @param  string $tagDocBlockLine
41       */
42      public function initialize($tagDocBlockLine)
43      {
44          $matches = array();
45   
46          if (!preg_match('#((?:[\w|\\\]+(?:\[\])*\|?)+)(?:\s+(\$\S+))?(?:\s+(.*))?#s', $tagDocBlockLine, $matches)) {
47              return;
48          }
49   
50          $this->types = explode('|', $matches[1]);
51   
52          if (isset($matches[2])) {
53              $this->variableName = $matches[2];
54          }
55   
56          if (isset($matches[3])) {
57              $this->description = trim(preg_replace('#\s+#', ' ', $matches[3]));
58          }
59      }
60   
61      /**
62       * Get parameter variable type
63       *
64       * @return string
65       * @deprecated 2.0.4 use getTypes instead
66       */
67      public function getType()
68      {
69          if (empty($this->types)) {
70              return '';
71          }
72   
73          return $this->types[0];
74      }
75   
76      public function getTypes()
77      {
78          return $this->types;
79      }
80   
81      /**
82       * Get parameter name
83       *
84       * @return string
85       */
86      public function getVariableName()
87      {
88          return $this->variableName;
89      }
90   
91      /**
92       * @return string
93       */
94      public function getDescription()
95      {
96          return $this->description;
97      }
98  }
99