Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Reference.php
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 * @api
20 */
21 class Reference
22 {
23 private $id;
24 private $invalidBehavior;
25 private $strict;
26
27 /**
28 * Constructor.
29 *
30 * @param string $id The service identifier
31 * @param int $invalidBehavior The behavior when the service does not exist
32 * @param bool $strict Sets how this reference is validated
33 *
34 * @see Container
35 */
36 public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $strict = true)
37 {
38 $this->id = strtolower($id);
39 $this->invalidBehavior = $invalidBehavior;
40 $this->strict = $strict;
41 }
42
43 /**
44 * __toString.
45 *
46 * @return string The service identifier
47 */
48 public function __toString()
49 {
50 return (string) $this->id;
51 }
52
53 /**
54 * Returns the behavior to be used when the service does not exist.
55 *
56 * @return int
57 */
58 public function getInvalidBehavior()
59 {
60 return $this->invalidBehavior;
61 }
62
63 /**
64 * Returns true when this Reference is strict
65 *
66 * @return bool
67 */
68 public function isStrict()
69 {
70 return $this->strict;
71 }
72 }
73