summaryrefslogtreecommitdiff
path: root/src/Template/Config.php
blob: b2fcbf813e93b0cfd87e9960c796f2d1830145ba (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
28
29
30
31
32
33
34
35
36
<?php

namespace Smarty\Template;

use Smarty\Smarty;
use Smarty\Template;
use Smarty\Exception;

/**
 * Smarty Config Resource Data Object
 * Metadata Container for Config Files
 *
 * @author     Uwe Tews
 */
class Config extends Source {

	/**
	 * Flag that source is a config file
	 *
	 * @var bool
	 */
	public $isConfig = true;

	/**
	 * @var array
	 */
	static protected $_incompatible_resources = ['extends' => true];

	public function createCompiler(): \Smarty\Compiler\BaseCompiler {
		return new \Smarty\Compiler\Configfile($this->smarty);
	}

	protected static function getDefaultHandlerFunc(Smarty $smarty) {
		return $smarty->default_config_handler_func;
	}
}