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 |
StringLoader.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) 2012 Fabien Potencier
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11 class Twig_Extension_StringLoader extends Twig_Extension
12 {
13 public function getFunctions()
14 {
15 return array(
16 new Twig_SimpleFunction('template_from_string', 'twig_template_from_string', array('needs_environment' => true)),
17 );
18 }
19
20 public function getName()
21 {
22 return 'string_loader';
23 }
24 }
25
26 /**
27 * Loads a template from a string.
28 *
29 * <pre>
30 * {{ include(template_from_string("Hello {{ name }}")) }}
31 * </pre>
32 *
33 * @param Twig_Environment $env A Twig_Environment instance
34 * @param string $template A template as a string or object implementing __toString()
35 *
36 * @return Twig_Template A Twig_Template instance
37 */
38 function twig_template_from_string(Twig_Environment $env, $template)
39 {
40 return $env->createTemplate((string) $template);
41 }
42