Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2809 rexy 1
<?php
2
/**
3
 * Smarty Resource Plugin
4
 *
5
 * @package    Smarty
6
 * @subpackage TemplateResources
7
 * @author     Rodney Rehm
8
 */
9
 
10
/**
11
 * Smarty Resource Plugin
12
 * Base implementation for resource plugins that don't use the compiler
13
 *
14
 * @package    Smarty
15
 * @subpackage TemplateResources
16
 */
17
abstract class Smarty_Resource_Uncompiled extends Smarty_Resource
18
{
19
    /**
20
     * Flag that it's an uncompiled resource
21
     *
22
     * @var bool
23
     */
24
    public $uncompiled = true;
25
 
26
    /**
27
     * Resource does implement populateCompiledFilepath() method
28
     *
29
     * @var bool
30
     */
31
    public $hasCompiledHandler = true;
32
 
33
    /**
34
     * populate compiled object with compiled filepath
35
     *
36
     * @param Smarty_Template_Compiled $compiled  compiled object
37
     * @param Smarty_Internal_Template $_template template object
38
     */
39
    public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
40
    {
41
        $compiled->filepath = $_template->source->filepath;
42
        $compiled->timestamp = $_template->source->timestamp;
43
        $compiled->exists = $_template->source->exists;
44
        if ($_template->smarty->merge_compiled_includes || $_template->source->handler->checkTimestamps()) {
45
            $compiled->file_dependency[ $_template->source->uid ] =
46
                array($compiled->filepath, $compiled->timestamp, $_template->source->type,);
47
        }
48
    }
49
}