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 |
ExpressionExtension.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\Bridge\Twig\Extension;
13
14 use Symfony\Component\ExpressionLanguage\Expression;
15
16 /**
17 * ExpressionExtension gives a way to create Expressions from a template.
18 *
19 * @author Fabien Potencier <fabien@symfony.com>
20 */
21 class ExpressionExtension extends \Twig_Extension
22 {
23 /**
24 * {@inheritdoc}
25 */
26 public function getFunctions()
27 {
28 return array(
29 new \Twig_SimpleFunction('expression', array($this, 'createExpression')),
30 );
31 }
32
33 public function createExpression($expression)
34 {
35 return new Expression($expression);
36 }
37
38 /**
39 * Returns the name of the extension.
40 *
41 * @return string The extension name
42 */
43 public function getName()
44 {
45 return 'expression';
46 }
47 }
48