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

PropertyTag.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 1.65 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\Generator\DocBlock\Tag;
11   
12  class PropertyTag extends AbstractTypeableTag implements TagInterface
13  {
14      /**
15       * @var string
16       */
17      protected $propertyName = null;
18   
19      /**
20       * @param string $propertyName
21       * @param array $types
22       * @param string $description
23       */
24      public function __construct($propertyName = null, $types = array(), $description = null)
25      {
26          if (!empty($propertyName)) {
27              $this->setPropertyName($propertyName);
28          }
29   
30          parent::__construct($types, $description);
31      }
32   
33      /**
34       * @return string
35       */
36      public function getName()
37      {
38          return 'property';
39      }
40   
41      /**
42       * @param string $propertyName
43       * @return self
44       */
45      public function setPropertyName($propertyName)
46      {
47          $this->propertyName = ltrim($propertyName, '$');
48          return $this;
49      }
50   
51      /**
52       * @return string
53       */
54      public function getPropertyName()
55      {
56          return $this->propertyName;
57      }
58   
59      /**
60       * @return string
61       */
62      public function generate()
63      {
64          $output = '@property'
65              . ((!empty($this->types)) ? ' ' . $this->getTypesAsString() : '')
66              . ((!empty($this->propertyName)) ? ' $' . $this->propertyName : '')
67              . ((!empty($this->description)) ? ' ' . $this->description : '');
68   
69          return $output;
70      }
71  }
72