aboutsummaryrefslogtreecommitdiff
path: root/lib/exTpl/Expression.php
blob: 15a485ddffb684a8674df46a6ab58d1380796497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
 * Expression.php - template parser expression interface and classes
 *
 * Copyright (c) 2013  Elmar Ludwig
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 */

namespace exTpl;

/**
 * Basic interface for expressions in the template parse tree. The
 * only required method is "value" to get the expression's value.
 */
interface Expression
{
    /**
     * Returns the value of this expression.
     *
     * @param Context $context  symbol table
     */
    public function value(Context $context): mixed;
}