]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/inc/classes/interfaces/template/class_CompileableTemplate.php
Initial import of current development status
[shipsimu.git] / ship-simu / inc / classes / interfaces / template / class_CompileableTemplate.php
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 (file)
index 0000000..8df39d8
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/**
+ * An interface for template engines
+ *
+ * @author     Roland Haeder <roland __NOSPAM__ [at] __REMOVE_ME__ mxchange [dot] org>
+ * @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]
+?>