Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
/*
4
 * This file is part of Mustache.php.
5
 *
6
 * (c) 2010-2017 Justin Hileman
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
 * Mustache Cache in-memory implementation.
14
 *
15
 * The in-memory cache is used for uncached lambda section templates. It's also useful during development, but is not
16
 * recommended for production use.
17
 */
18
class Mustache_Cache_NoopCache extends Mustache_Cache_AbstractCache
19
{
20
    /**
21
     * Loads nothing. Move along.
22
     *
23
     * @param string $key
24
     *
25
     * @return bool
26
     */
27
    public function load($key)
28
    {
29
        return false;
30
    }
31
 
32
    /**
33
     * Loads the compiled Mustache Template class without caching.
34
     *
35
     * @param string $key
36
     * @param string $value
37
     */
38
    public function cache($key, $value)
39
    {
40
        $this->log(
41
            Mustache_Logger::WARNING,
42
            'Template cache disabled, evaluating "{className}" class at runtime',
43
            array('className' => $key)
44
        );
45
        eval('?>' . $value);
46
    }
47
}