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. |
|
(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 public function getFunctions()
28 {
29 return array(
30 new ExpressionFunction('service', function ($arg) {
31 return sprintf('$this->get(%s)', $arg);
32 }, function (array $variables, $value) {
33 return $variables['container']->get($value);
34 }),
35
36 new ExpressionFunction('parameter', function ($arg) {
37 return sprintf('$this->getParameter(%s)', $arg);
38 }, function (array $variables, $value) {
39 return $variables['container']->getParameter($value);
40 }),
41 );
42 }
43 }
44