]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/inc/classes/main/template/class_TemplateEngine.php
type hints added
[shipsimu.git] / ship-simu / inc / classes / main / template / class_TemplateEngine.php
index a3e94b40b1700d9f6142eba2f9950fc13c37a4c6..62d78cbe27be43146cb89c82401c66ed35e624a8 100644 (file)
@@ -136,16 +136,16 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         *
         * @param               $basePath               The local base path for all templates
         * @param               $langInstance   An instance of LanguageSystem (default)
-        * @param               $ioInstance     An instance of FileIOHandler (default, middleware!)
-        * @return      $tplInstance    An instance of TemplateEngine
-        * @throws      BasePathIsEmptyException                If the provided $basePath is empty
-        * @throws      InvalidBasePathStringException  If $basePath is no string
-        * @throws      BasePathIsNoDirectoryException  If $basePath is no
-        *                                                                              directory or not found
-        * @throws      BasePathReadProtectedException  If $basePath is
-        *                                                                              read-protected
+        * @param               $ioInstance             An instance of FileIOHandler (default, middleware!)
+        * @return              $tplInstance    An instance of TemplateEngine
+        * @throws              BasePathIsEmptyException                If the provided $basePath is empty
+        * @throws              InvalidBasePathStringException  If $basePath is no string
+        * @throws              BasePathIsNoDirectoryException  If $basePath is no
+        *                                                                                              directory or not found
+        * @throws              BasePathReadProtectedException  If $basePath is
+        *                                                                                              read-protected
         */
-       public final static function createTemplateEngine ($basePath, $langInstance, $ioInstance) {
+       public final static function createTemplateEngine ($basePath, ManageableLanguage $langInstance, FileIOHandler $fileIOInstance) {
                // Get a new instance
                $tplInstance = new TemplateEngine();
 
@@ -175,7 +175,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
 
                // Set the language and IO instances
                $tplInstance->setLanguageInstance($langInstance);
-               $tplInstance->setIOInstance($ioInstance);
+               $tplInstance->setIOInstance($fileIOInstance);
 
                // Set template extensions
                $tplInstance->setRawTemplateExtension($cfgInstance->readConfig("raw_template_extension"));
@@ -483,7 +483,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         * Private setter for raw template data
         *
         * @param               $rawTemplateData        The raw data from the template
-        * @return      void
+        * @return              void
         */
        private final function setRawTemplateData ($rawTemplateData) {
                // Cast it to string