]> git.mxchange.org Git - shipsimu.git/commitdiff
type hints added
authorRoland Häder <roland@mxchange.org>
Sun, 24 Feb 2008 10:25:38 +0000 (10:25 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 24 Feb 2008 10:25:38 +0000 (10:25 +0000)
ship-simu/application/selector/class_ApplicationSelector.php
ship-simu/inc/classes/main/template/class_TemplateEngine.php

index 51278ea4125da8223de2599cc19175cecefbb480..741c0d3e0de47808ba5db68da9306aefd8808500 100644 (file)
@@ -74,9 +74,9 @@ class ApplicationSelector extends BaseFrameworkSystem {
         *
         * @param               $langInstance           The language sub-system: LanguageSystem
         * @param               $fileIOInstance The file I/O instance
         *
         * @param               $langInstance           The language sub-system: LanguageSystem
         * @param               $fileIOInstance The file I/O instance
-        * @return      $selInstance            An instance of ApplicationSelector
+        * @return              $selInstance            An instance of ApplicationSelector
         */
         */
-       public static function createApplicationSelector ($langInstance, $fileIOInstance) {
+       public static function createApplicationSelector (ManageableLanguage $langInstance, FileIOHandler $fileIOInstance) {
                // Get a new instance
                $selInstance = new ApplicationSelector();
 
                // Get a new instance
                $selInstance = new ApplicationSelector();
 
@@ -132,14 +132,14 @@ class ApplicationSelector extends BaseFrameworkSystem {
         * application helper instance (ApplicationHelper by default).
         *
         * @param               $appInstance    An application helper instance
         * application helper instance (ApplicationHelper by default).
         *
         * @param               $appInstance    An application helper instance
-        * @return      $tplEngine      The template engine instance
-        * @throws      NullPointerException    If the template engine could not
-        *                                                              be initialized
-        * @throws      NoObjectException               If $tplEngine is not an object
-        * @throws      MissingMethodException  If $tplEngine misses a required
-        *                                                              method 'loadWebTemplate()'
+        * @return              $tplEngine      The template engine instance
+        * @throws              NullPointerException    If the template engine could not
+        *                                                                              be initialized
+        * @throws              NoObjectException               If $tplEngine is not an object
+        * @throws              MissingMethodException  If $tplEngine misses a required
+        *                                                                              method 'loadWebTemplate()'
         */
         */
-       private function prepareTemplateEngine ($appInstance) {
+       private function prepareTemplateEngine (ManageableApplication $appInstance) {
                // Generate FQFN for all application templates
                $fqfn = sprintf("%s%s/%s/%s",
                        PATH,
                // Generate FQFN for all application templates
                $fqfn = sprintf("%s%s/%s/%s",
                        PATH,
@@ -231,7 +231,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
         *
         * @param               $tplEngine      An instance of TemplateEngine
         */
         *
         * @param               $tplEngine      An instance of TemplateEngine
         */
-       private function setSelectorTemplateEngine ($tplEngine) {
+       private function setSelectorTemplateEngine (CompileableTemplate $tplEngine) {
                $this->selectorTplEngine = $tplEngine;
        }
 
                $this->selectorTplEngine = $tplEngine;
        }
 
@@ -275,7 +275,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                $ignoreItem = (string) $ignoreItem;
                $this->dirIgnoreList[] = $ignoreItem;
        }
                $ignoreItem = (string) $ignoreItem;
                $this->dirIgnoreList[] = $ignoreItem;
        }
-       
+
        /**
         * Setter for language instance
         *
        /**
         * Setter for language instance
         *
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               $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();
 
                // 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);
 
                // 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"));
 
                // 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
         * 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
         */
        private final function setRawTemplateData ($rawTemplateData) {
                // Cast it to string