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

Reference.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.85 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\DependencyInjection;
13   
14  /**
15   * Reference represents a service reference.
16   *
17   * @author Fabien Potencier <fabien@symfony.com>
18   */
19  class Reference
20  {
21      private $id;
22      private $invalidBehavior;
23      private $strict;
24   
25      /**
26       * Note: The $strict parameter is deprecated since version 2.8 and will be removed in 3.0.
27       *
28       * @param string $id              The service identifier
29       * @param int    $invalidBehavior The behavior when the service does not exist
30       * @param bool   $strict          Sets how this reference is validated
31       *
32       * @see Container
33       */
34      public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $strict = true)
35      {
36          $this->id = strtolower($id);
37          $this->invalidBehavior = $invalidBehavior;
38          $this->strict = $strict;
39      }
40   
41      /**
42       * @return string The service identifier
43       */
44      public function __toString()
45      {
46          return $this->id;
47      }
48   
49      /**
50       * Returns the behavior to be used when the service does not exist.
51       *
52       * @return int
53       */
54      public function getInvalidBehavior()
55      {
56          return $this->invalidBehavior;
57      }
58   
59      /**
60       * Returns true when this Reference is strict.
61       *
62       * @return bool
63       *
64       * @deprecated since version 2.8, to be removed in 3.0.
65       */
66      public function isStrict($triggerDeprecationError = true)
67      {
68          if ($triggerDeprecationError) {
69              @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
70          }
71   
72          return $this->strict;
73      }
74  }
75