-
Notifications
You must be signed in to change notification settings - Fork 0
/
SmartyResourceInterface.php
42 lines (37 loc) · 1.14 KB
/
SmartyResourceInterface.php
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
37
38
39
40
41
42
<?php
namespace Imponeer\Contracts\Smarty\Extension;
use Smarty_Internal_Template;
use Smarty_Template_Source;
use SmartyException;
/**
* Defines custom smarty resource type
*
* @package Imponeer\Contracts\Smarty\Extension
*/
interface SmartyResourceInterface extends SmartyExtensionInterface
{
/**
* Populate source with metadata from resource
*
* @param Smarty_Template_Source $source source
* @param Smarty_Internal_Template|null $template template
*/
public function populate(Smarty_Template_Source $source, ?Smarty_Internal_Template $template = null);
/**
* Load template's source into current template
*
* @param Smarty_Template_Source $source source
*
* @return string template source
* @throws SmartyException if source cannot be loaded
*/
public function getContent(Smarty_Template_Source $source);
/**
* Gets basename for compiled filename
*
* @param Smarty_Template_Source $source source object
*
* @return string resource's basename
*/
public function getBasename(Smarty_Template_Source $source);
}