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.
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: 02.04.2025, 15:04 - Dateigröße: 1.97 KiB


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 function explode;
013  use function preg_match;
014  use function preg_replace;
015  use function trim;
016   
017  class ParamTag implements TagInterface, PhpDocTypedTagInterface
018  {
019      /**
020       * @var array
021       */
022      protected $types = [];
023   
024      /**
025       * @var string
026       */
027      protected $variableName;
028   
029      /**
030       * @var string
031       */
032      protected $description;
033   
034      /**
035       * @return string
036       */
037      public function getName()
038      {
039          return 'param';
040      }
041   
042      /**
043       * Initializer
044       *
045       * @param  string $tagDocBlockLine
046       */
047      public function initialize($tagDocBlockLine)
048      {
049          $matches = [];
050   
051          if (! preg_match('#((?:[\w|\\\]+(?:\[\])*\|?)+)(?:\s+(\$\S+))?(?:\s+(.*))?#s', $tagDocBlockLine, $matches)) {
052              return;
053          }
054   
055          $this->types = explode('|', $matches[1]);
056   
057          if (isset($matches[2])) {
058              $this->variableName = $matches[2];
059          }
060   
061          if (isset($matches[3])) {
062              $this->description = trim(preg_replace('#\s+#', ' ', $matches[3]));
063          }
064      }
065   
066      /**
067       * Get parameter variable type
068       *
069       * @return string
070       * @deprecated 2.0.4 use getTypes instead
071       */
072      public function getType()
073      {
074          if (empty($this->types)) {
075              return '';
076          }
077   
078          return $this->types[0];
079      }
080   
081      public function getTypes()
082      {
083          return $this->types;
084      }
085   
086      /**
087       * Get parameter name
088       *
089       * @return string
090       */
091      public function getVariableName()
092      {
093          return $this->variableName;
094      }
095   
096      /**
097       * @return string
098       */
099      public function getDescription()
100      {
101          return $this->description;
102      }
103  }
104