Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

AuthorTag.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 2.49 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\Generator\DocBlock\Tag;
 011   
 012  use Zend\Code\Generator\AbstractGenerator;
 013  use Zend\Code\Generator\DocBlock\TagManager;
 014  use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionTagInterface;
 015   
 016  class AuthorTag extends AbstractGenerator implements TagInterface
 017  {
 018      /**
 019       * @var string
 020       */
 021      protected $authorName;
 022   
 023      /**
 024       * @var string
 025       */
 026      protected $authorEmail;
 027   
 028      /**
 029       * @param string $authorName
 030       * @param string $authorEmail
 031       */
 032      public function __construct($authorName = null, $authorEmail = null)
 033      {
 034          if (! empty($authorName)) {
 035              $this->setAuthorName($authorName);
 036          }
 037   
 038          if (! empty($authorEmail)) {
 039              $this->setAuthorEmail($authorEmail);
 040          }
 041      }
 042   
 043      /**
 044       * @param ReflectionTagInterface $reflectionTag
 045       * @return AuthorTag
 046       * @deprecated Deprecated in 2.3. Use TagManager::createTagFromReflection() instead
 047       */
 048      public static function fromReflection(ReflectionTagInterface $reflectionTag)
 049      {
 050          $tagManager = new TagManager();
 051          $tagManager->initializeDefaultTags();
 052          return $tagManager->createTagFromReflection($reflectionTag);
 053      }
 054   
 055      /**
 056       * @return string
 057       */
 058      public function getName()
 059      {
 060          return 'author';
 061      }
 062   
 063      /**
 064       * @param string $authorEmail
 065       * @return AuthorTag
 066       */
 067      public function setAuthorEmail($authorEmail)
 068      {
 069          $this->authorEmail = $authorEmail;
 070          return $this;
 071      }
 072   
 073      /**
 074       * @return string
 075       */
 076      public function getAuthorEmail()
 077      {
 078          return $this->authorEmail;
 079      }
 080   
 081      /**
 082       * @param string $authorName
 083       * @return AuthorTag
 084       */
 085      public function setAuthorName($authorName)
 086      {
 087          $this->authorName = $authorName;
 088          return $this;
 089      }
 090   
 091      /**
 092       * @return string
 093       */
 094      public function getAuthorName()
 095      {
 096          return $this->authorName;
 097      }
 098   
 099      /**
 100       * @return string
 101       */
 102      public function generate()
 103      {
 104          $output = '@author'
 105              . (! empty($this->authorName) ? ' ' . $this->authorName : '')
 106              . (! empty($this->authorEmail) ? ' <' . $this->authorEmail . '>' : '');
 107   
 108          return $output;
 109      }
 110  }
 111