Dotclear

source: inc/libs/twig/TemplateInterface.php @ 0:54703be25dd6

Revision 0:54703be25dd6, 1.1 KB checked in by Dsls <dsls@…>, 14 years ago (diff)

2.3 branch (trunk) first checkin

Line 
1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) 2009 Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12/**
13 * Interface implemented by all compiled templates.
14 *
15 * @package twig
16 * @author  Fabien Potencier <fabien.potencier@symfony-project.com>
17 */
18interface Twig_TemplateInterface
19{
20    const ANY_CALL    = 'any';
21    const ARRAY_CALL  = 'array';
22    const METHOD_CALL = 'method';
23
24    /**
25     * Renders the template with the given context and returns it as string.
26     *
27     * @param array $context An array of parameters to pass to the template
28     *
29     * @return string The rendered template
30     */
31    function render(array $context);
32
33    /**
34     * Displays the template with the given context.
35     *
36     * @param array $context An array of parameters to pass to the template
37     */
38    function display(array $context);
39
40    /**
41     * Returns the bound environment for this template.
42     *
43     * @return Twig_Environment The current environment
44     */
45    function getEnvironment();
46}
Note: See TracBrowser for help on using the repository browser.

Sites map