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

DataCollector.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 1.30 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\HttpKernel\DataCollector;
13   
14  use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
15   
16  /**
17   * DataCollector.
18   *
19   * Children of this class must store the collected data in the data property.
20   *
21   * @author Fabien Potencier <fabien@symfony.com>
22   * @author Bernhard Schussek <bschussek@symfony.com>
23   */
24  abstract class DataCollector implements DataCollectorInterface, \Serializable
25  {
26      protected $data = array();
27   
28      /**
29       * @var ValueExporter
30       */
31      private $valueExporter;
32   
33      public function serialize()
34      {
35          return serialize($this->data);
36      }
37   
38      public function unserialize($data)
39      {
40          $this->data = unserialize($data);
41      }
42   
43      /**
44       * Converts a PHP variable to a string.
45       *
46       * @param mixed $var A PHP variable
47       *
48       * @return string The string representation of the variable
49       */
50      protected function varToString($var)
51      {
52          if (null === $this->valueExporter) {
53              $this->valueExporter = new ValueExporter();
54          }
55   
56          return $this->valueExporter->exportValue($var);
57      }
58  }
59