X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=ship-simu%2Finc%2Fclasses%2Finterfaces%2Ftemplate%2Fclass_CompileableTemplate.php;fp=ship-simu%2Finc%2Fclasses%2Finterfaces%2Ftemplate%2Fclass_CompileableTemplate.php;h=8df39d83350fe7dcba03c02ed8f116b4fa6747c5;hp=0000000000000000000000000000000000000000;hb=85db0cda2cdb5a801db7020aa55b6f4d969f7674;hpb=6f7c99239b34b8ff5e05d719ea24dd213f03f955 diff --git a/ship-simu/inc/classes/interfaces/template/class_CompileableTemplate.php b/ship-simu/inc/classes/interfaces/template/class_CompileableTemplate.php new file mode 100644 index 0000000..8df39d8 --- /dev/null +++ b/ship-simu/inc/classes/interfaces/template/class_CompileableTemplate.php @@ -0,0 +1,82 @@ + + * @version 0.1 + */ +interface CompileableTemplate extends FrameworkInterface { + /** + * Assign variables for templates + * + * @param $var The "variable" we want to assign + * @param $value The value we want to store in the variable + * @return void + */ + function assignVariable ($var, $value); + + /** + * Assign a configuration variables for templates + * + * @param $var The configuration "variable" we want to assign + * @param $value The value we want to store in the variable + * @return void + */ + function assignConfigVariable ($var, $value); + + /** + * Load a specified web template into the engine + * + * @param $template The web template we shall load which is + * located in "html" by default + * @return void + */ + function loadWebTemplate ($template); + + /** + * Load a specified code template into the engine for later compilation + * with other code/web/email templates. + * + * @param $template The code template we shall load which is + * located in "html" by default + * @return void + */ + function loadCodeTemplate ($template); + + /** + * Load a specified email template into the engine + * + * @param $template The email template we shall load which is + * located in "emails" by default + * @return void + */ + function loadEmailTemplate ($template); + + /** + * Compile all variables by inserting their respective values + * + * @return void + */ + function compileVariables (); + + + /** + * Compile all required code/web/email-templates into the current one + * + * @return void + */ + function compileTemplate (); + + /** + * Output the compiled template to the outside world. In case of web + * templates this would be vaild (X)HTML code. And in case of email + * templates this would store a prepared email body inside the template + * engine. + * + * @return void + */ + function output (); +} // END - class + +// [EOF] +?>