8df39d83350fe7dcba03c02ed8f116b4fa6747c5
[mailer.git] / inc / classes / interfaces / template / class_CompileableTemplate.php
1 <?php
2 /**
3  * An interface for template engines
4  *
5  * @author      Roland Haeder <roland __NOSPAM__ [at] __REMOVE_ME__ mxchange [dot] org>
6  * @version     0.1
7  */
8 interface CompileableTemplate extends FrameworkInterface {
9         /**
10          * Assign variables for templates
11          *
12          * @param               $var            The "variable" we want to assign
13          * @param               $value  The value we want to store in the variable
14          * @return      void
15          */
16         function assignVariable ($var, $value);
17
18         /**
19          * Assign a configuration variables for templates
20          *
21          * @param               $var            The configuration "variable" we want to assign
22          * @param               $value  The value we want to store in the variable
23          * @return      void
24          */
25         function assignConfigVariable ($var, $value);
26
27         /**
28          * Load a specified web template into the engine
29          *
30          * @param               $template               The web template we shall load which is
31          *                                              located in "html" by default
32          * @return      void
33          */
34         function loadWebTemplate ($template);
35
36         /**
37          * Load a specified code template into the engine for later compilation
38          * with other code/web/email templates.
39          *
40          * @param               $template               The code template we shall load which is
41          *                                              located in "html" by default
42          * @return      void
43          */
44         function loadCodeTemplate ($template);
45
46         /**
47          * Load a specified email template into the engine
48          *
49          * @param               $template               The email template we shall load which is
50          *                                              located in "emails" by default
51          * @return      void
52          */
53         function loadEmailTemplate ($template);
54
55         /**
56          * Compile all variables by inserting their respective values
57          *
58          * @return      void
59          */
60         function compileVariables ();
61
62
63         /**
64          * Compile all required code/web/email-templates into the current one
65          *
66          * @return      void
67          */
68         function compileTemplate ();
69
70         /**
71          * Output the compiled template to the outside world. In case of web
72          * templates this would be vaild (X)HTML code. And in case of email
73          * templates this would store a prepared email body inside the template
74          * engine.
75          *
76          * @return      void
77          */
78         function output ();
79 } // END - class
80
81 // [EOF]
82 ?>