]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/class_BaseFrameworkSystem.php
Renamed
[shipsimu.git] / inc / classes / main / class_BaseFrameworkSystem.php
index 3b0a939c50725eee298d4335a61265863ecb4537..5c96b95c0d0ecf5377999fa27ea49b41b259ecce 100644 (file)
@@ -63,6 +63,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $resolverInstance = null;
 
+       /**
+        * Template engine instance
+        */
+       private $templateInstance = null;
+
        /**
         * The real class name
         */
@@ -256,9 +261,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                } elseif (is_null($arg)) {
                                        // Null
                                        $argsString .= "(null)";
+                               } elseif (is_resource($arg)) {
+                                       // Resource
+                                       $argsString .= "(resource)";
                                } else {
                                        // Unknown type (please report!)
-                                       $argsString .= $arg."(unknown!)";
+                                       $argsString .= $arg."(<em>unknown!</em>)";
                                }
 
                                // Add comma
@@ -266,7 +274,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        }
 
                        // Remove last comma
-                       if (substr($argsString, -2, 1) === ",") $argsString = substr($argsString, 0, -2);
+                       if (substr($argsString, -2, 1) === ",") {
+                               $argsString = substr($argsString, 0, -2);
+                       } // END - if
                } else {
                        // Invalid arguments!
                        $argsString = sprintf("!INVALID:%s!", $args);
@@ -315,6 +325,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                }
        }
 
+       /**
+        * Setter for template engine instances
+        *
+        * @param       $templateInstance       An instance of a template engine class
+        * @return      void
+        */
+       protected final function setTemplateInstance (CompileableTemplate $templateInstance) {
+               $this->templateInstance = $templateInstance;
+       }
+
+       /**
+        * Getter for template engine instances
+        *
+        * @return      $templateInstance       An instance of a template engine class
+        */
+       protected final function getTemplateInstance () {
+               return $this->templateInstance;
+       }
+
        /**
         * Setter for search instance
         *
@@ -880,7 +909,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        }
 
        /**
-        * Prepare the template engine (TemplateEngine by default) for a given
+        * Prepare the template engine (WebTemplateEngine by default) for a given
         * application helper instance (ApplicationHelper by default).
         *
         * @param               $appInstance                    An application helper instance or
@@ -993,7 +1022,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @return      void
         */
-       public function debugBacktrace () {
+       public function debugBackTrace () {
                // Sorry, there is no other way getting this nice backtrace
                print "<pre>\n";
                debug_print_backtrace();