Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 |
ServiceClosureArgument.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\Argument;
13
14 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
15 use Symfony\Component\DependencyInjection\Reference;
16
17 /**
18 * Represents a service wrapped in a memoizing closure.
19 *
20 * @author Nicolas Grekas <p@tchwork.com>
21 */
22 class ServiceClosureArgument implements ArgumentInterface
23 {
24 private $values;
25
26 public function __construct(Reference $reference)
27 {
28 $this->values = [$reference];
29 }
30
31 /**
32 * {@inheritdoc}
33 */
34 public function getValues()
35 {
36 return $this->values;
37 }
38
39 /**
40 * {@inheritdoc}
41 */
42 public function setValues(array $values)
43 {
44 if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) {
45 throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.');
46 }
47
48 $this->values = $values;
49 }
50 }
51