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 |
ExpressionLanguageProvider.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 use Symfony\Component\ExpressionLanguage\ExpressionFunction;
15 use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
16
17 /**
18 * Define some ExpressionLanguage functions.
19 *
20 * To get a service, use service('request').
21 * To get a parameter, use parameter('kernel.debug').
22 *
23 * @author Fabien Potencier <fabien@symfony.com>
24 */
25 class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface
26 {
27 private $serviceCompiler;
28
29 public function __construct(callable $serviceCompiler = null)
30 {
31 $this->serviceCompiler = $serviceCompiler;
32 }
33
34 public function getFunctions()
35 {
36 return [
37 new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) {
38 return sprintf('$this->get(%s)', $arg);
39 }, function (array $variables, $value) {
40 return $variables['container']->get($value);
41 }),
42
43 new ExpressionFunction('parameter', function ($arg) {
44 return sprintf('$this->getParameter(%s)', $arg);
45 }, function (array $variables, $value) {
46 return $variables['container']->getParameter($value);
47 }),
48 ];
49 }
50 }
51