]> git.mxchange.org Git - core.git/commitdiff
Refactured code for deprecated includes file_io and language:
authorRoland Häder <roland@mxchange.org>
Thu, 10 Mar 2011 14:05:22 +0000 (14:05 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 10 Mar 2011 14:05:22 +0000 (14:05 +0000)
- Include inc/file_io.php and inc/language.php are now deprecated, please no
  longer use them
- Therefore the code needs some refacturing
- ... and two deprecated exceptions!
- TODOs.txt updated

15 files changed:
docs/TODOs.txt
inc/classes/exceptions/language/class_MissingFileIoHandlerException.php
inc/classes/exceptions/language/class_MissingLanguageHandlerException.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/database/databases/class_LocalFileDatabase.php
inc/classes/main/template/class_BaseTemplateEngine.php
inc/classes/main/template/console/class_ConsoleTemplateEngine.php
inc/classes/main/template/image/class_ImageTemplateEngine.php
inc/classes/main/template/mail/class_MailTemplateEngine.php
inc/classes/main/template/menu/class_MenuTemplateEngine.php
inc/classes/main/template/web/class_WebTemplateEngine.php
inc/database/lib-local.php
inc/file_io.php
inc/language.php
inc/loader/class_ClassLoader.php

index 8e647c744a85f5a5626336cce8830ae45ca4a589..5169e005c46e69dfeb68953297116b21e56071fd 100644 (file)
@@ -3,15 +3,16 @@
 ./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo             Try to rewrite user/guest login classes and mark this exception as deprecated
 ./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo             Rename this class to NoFoundEntryException
 ./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo              Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1131:  * @todo        Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1145:                 // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:1133:  * @todo        Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1147:                 // @TODO Finish this part!
 ./inc/classes/main/class_BaseFrameworkSystem.php:154:  // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:235:   * @todo        This is old code. Do we still need this old lost code?
-./inc/classes/main/class_BaseFrameworkSystem.php:303:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:233:   * @todo        This is old code. Do we still need this old lost code?
+./inc/classes/main/class_BaseFrameworkSystem.php:301:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
 ./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64:       * @todo        Add some stuff here: Some personal data, app/game related data
 ./inc/classes/main/commands/web/class_WebProblemCommand.php:58:         * @todo        0% done
 ./inc/classes/main/commands/web/class_WebStatusCommand.php:58:  * @todo        0% done
 ./inc/classes/main/console/class_ConsoleTools.php:147:  * @todo        This should be moved out to an external class, e.g. HttpClient
+./inc/classes/main/console/class_ConsoleTools.php:154:         // @TODO Add some DNS caching here
 ./inc/classes/main/console/class_ConsoleTools.php:45:   * @todo        We should connect this to a caching class to cache DNS requests
 ./inc/classes/main/console/class_ConsoleTools.php:58:          // @TODO Here should the cacher be implemented
 ./inc/classes/main/controller/console/class_ConsoleDefaultController.php:10: * @todo           This controller shall still provide some headlines for sidebars
@@ -26,7 +27,7 @@
 ./inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo            This controller shall still provide some headlines for sidebars
 ./inc/classes/main/criteria/search/class_SearchCriteria.php:114:        * @todo        Find a nice casting here. (int) allows until and including 32766.
 ./inc/classes/main/criteria/search/class_SearchCriteria.php:94:         * @todo        Find a nice casting here. (int) allows until and including 32766.
-./inc/classes/main/database/databases/class_LocalFileDatabase.php:363:  * @todo        Do some checks on the database directory and files here
+./inc/classes/main/database/databases/class_LocalFileDatabase.php:360:  * @todo        Do some checks on the database directory and files here
 ./inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:426:       * @todo        Find something useful with this!
 ./inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php:82:        * @todo        0% done
 ./inc/classes/main/filter/change/class_EmailChangeFilter.php:54:        * @todo        Implement email change of the user here. HINT: Use the User class!
 ./inc/classes/main/result/class_DatabaseResult.php:379:4        * @todo        Find a caching way without modifying the result array
 ./inc/classes/main/rng/class_RandomNumberGenerator.php:150:     * @todo        I had a better random number generator here but now it is somewhere lost :(
 ./inc/classes/main/rng/class_RandomNumberGenerator.php:83:      * @todo        Add site key for stronger salt!
-./inc/classes/main/template/class_BaseTemplateEngine.php:1049:                 // @TODO This silent abort should be logged, maybe.
-./inc/classes/main/template/class_BaseTemplateEngine.php:1057:                 // @TODO Old behaviour, will become obsolete!
-./inc/classes/main/template/class_BaseTemplateEngine.php:1060:                 // @TODO Yet another old way
-./inc/classes/main/template/class_BaseTemplateEngine.php:1126:                 // @TODO This silent abort should be logged, maybe.
-./inc/classes/main/template/class_BaseTemplateEngine.php:1147:  * @todo        Make this code some nicer...
-./inc/classes/main/template/class_BaseTemplateEngine.php:955:   * @todo        Unfinished work or don't die here.
-./inc/classes/main/template/class_BaseTemplateEngine.php:972:                          // @TODO Non-string found so we need some deeper analysis...
+./inc/classes/main/template/class_BaseTemplateEngine.php:1055:                 // @TODO This silent abort should be logged, maybe.
+./inc/classes/main/template/class_BaseTemplateEngine.php:1063:                 // @TODO Old behaviour, will become obsolete!
+./inc/classes/main/template/class_BaseTemplateEngine.php:1066:                 // @TODO Yet another old way
+./inc/classes/main/template/class_BaseTemplateEngine.php:1132:                 // @TODO This silent abort should be logged, maybe.
+./inc/classes/main/template/class_BaseTemplateEngine.php:1153:  * @todo        Make this code some nicer...
+./inc/classes/main/template/class_BaseTemplateEngine.php:961:   * @todo        Unfinished work or don't die here.
+./inc/classes/main/template/class_BaseTemplateEngine.php:978:                          // @TODO Non-string found so we need some deeper analysis...
 ./inc/classes/main/template/console/class_ConsoleTemplateEngine.php:10: * @todo                This template engine does not make use of setTemplateType()
-./inc/classes/main/template/image/class_ImageTemplateEngine.php:221:    * @todo        Find something usefull with this!
-./inc/classes/main/template/image/class_ImageTemplateEngine.php:241:    * @todo        Add cache creation here
+./inc/classes/main/template/image/class_ImageTemplateEngine.php:213:    * @todo        Find something usefull with this!
+./inc/classes/main/template/image/class_ImageTemplateEngine.php:233:    * @todo        Add cache creation here
 ./inc/classes/main/template/mail/class_MailTemplateEngine.php:10: * @todo              This template engine does not make use of setTemplateType()
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:234:      * @todo        Add cache creation here
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:244:      * @todo        Should we call back the mailer class here?
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:325:      * @todo        0% done
-./inc/classes/main/template/menu/class_MenuTemplateEngine.php:273:      * @todo        Find something useful with this!
-./inc/classes/main/template/menu/class_MenuTemplateEngine.php:319:      * @todo        Add cache creation here
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:226:      * @todo        Add cache creation here
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:236:      * @todo        Should we call back the mailer class here?
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:317:      * @todo        0% done
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:265:      * @todo        Find something useful with this!
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:311:      * @todo        Add cache creation here
 ./inc/classes/main/user/class_BaseUser.php:308:         * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
 ./inc/classes/main/user/class_BaseUser.php:80:  * @todo        Find a way of casting here. "(int)" might destroy the user id > 32766
 ./inc/classes/main/user/member/class_Member.php:84:     * @todo        Add more ways over creating user classes
 ./inc/config/class_FrameworkConfiguration.php:172:      * @todo        We have to add some more entries from $_SERVER here
 ./inc/database.php:11: * @todo         We should minimize these includes
 ./inc/database.php:51:// @TODO Rewrite this
-./inc/file_io.php:13: * @todo          We should minimize these includes
 ./inc/hooks.php:11: * @todo            We should minimize these includes
 ./inc/hooks.php:28:// @TODO This makes the core depending on the SPL. But it should be installed anyway.
 ./inc/includes.php:11: * @todo         We should minimize these includes
 ./inc/includes.php:38:// @TODO Find a nicer OOP-ed way for this
-./inc/language.php:10: * @todo         We should minimize these includes
-./inc/language.php:33:// @TODO Rewrite this
-./inc/loader/class_ClassLoader.php:262:                        /* @todo: Do not die here. */
+./inc/loader/class_ClassLoader.php:264:                        /* @todo: Do not die here. */
 ./inc/output.php:11: * @todo           We should minimize these includes
 ./inc/selector.php:11: * @todo         We should minimize these includes
 ### ### DEPRECATION FOLLOWS: ### ###
 ./inc/classes/exceptions/io/class_FileNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/io/class_FilePointerNotOpenedException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php:2:// @DEPRECATED
+./inc/classes/exceptions/language/class_MissingFileIoHandlerException.php:2:// @DEPRECATED
+./inc/classes/exceptions/language/class_MissingLanguageHandlerException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ClassNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:2:// @DEPRECATED
 ./inc/classes.php:9: * @deprecated
 ./inc/database.php:10: * @deprecated
-./inc/file_io.php:12: * @deprecated
+./inc/file_io.php:2:// @DEPRECATED
 ./inc/hooks.php:10: * @deprecated
 ./inc/includes.php:10: * @deprecated
-./inc/language.php:9: * @deprecated
+./inc/language.php:2:// @DEPRECATED
 ./inc/output.php:10: * @deprecated
 ./inc/selector.php:10: * @deprecated
index b21616bc430a02a7ed4e4a83f48eadeafb5366a2..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,45 +1,3 @@
 <?php
-/**
- * An exception thrown when the language handler is missing
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class MissingFileIoHandlerException extends FrameworkException {
-       /**
-        * The constructor
-        *
-        * @param       $class  Class throwing this exception
-        * @param       $code   Code number for the exception
-        * @return      void
-        */
-       public function __construct (FrameworkInterface $class, $code) {
-               // Add a message around the missing class
-               $message = sprintf("[%s:%d] File i/o sub-system not initialized!",
-                       $class->__toString(),
-                       $this->getLine()
-               );
-
-               // Call parent constructor
-               parent::__construct($message, $code);
-       }
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 2b1163318ad299179ca2d8f3b828222c573d10bd..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,45 +1,3 @@
 <?php
-/**
- * An exception thrown when the language handler is missing
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class MissingLanguageHandlerException extends FrameworkException {
-       /**
-        * The constructor
-        *
-        * @param       $class  Class throwing this exception
-        * @param       $code   Code number for the exception
-        * @return      void
-        */
-       public function __construct (FrameworkInterface $class, $code) {
-               // Add a message around the missing class
-               $message = sprintf("[%s:%d] Language sub-system not initialized!",
-                       $class->__toString(),
-                       $this->getLine()
-               );
-
-               // Call parent constructor
-               parent::__construct($message, $code);
-       }
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 656e3cdc4fb603a6d1a6215551458e8b5661a32f..485264212e4c82a58bd55ad776eb3543f243439a 100644 (file)
@@ -197,8 +197,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        const EXCEPTION_ATTRIBUTES_ARE_MISSING       = 0x02b;
        const EXCEPTION_ARRAY_ELEMENTS_MISSING       = 0x02c;
        const EXCEPTION_TEMPLATE_ENGINE_UNSUPPORTED  = 0x02d;
-       const EXCEPTION_MISSING_LANGUAGE_HANDLER     = 0x02e;
-       const EXCEPTION_MISSING_FILE_IO_HANDLER      = 0x02f;
        const EXCEPTION_MISSING_ELEMENT              = 0x030;
        const EXCEPTION_HEADERS_ALREADY_SENT         = 0x031;
        const EXCEPTION_DEFAULT_CONTROLLER_GONE      = 0x032;
@@ -626,7 +624,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                if ((!isset($this->decimals)) || (!isset($this->thousands))) {
                        // Throw an exception
                        throw new MissingDecimalsThousandsSeperatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING);
-               }
+               } // END - if
 
                // Cast the number
                $value = (float) $value;
@@ -667,7 +665,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public final function addMissingTrailingSlash ($str) {
                // Is there a trailing slash?
-               if (substr($str, -1, 1) != '/') $str .= '/';
+               if (substr($str, -1, 1) != '/') {
+                       $str .= '/';
+               } // END - if
+
+               // Return string with trailing slash
                return $str;
        }
 
@@ -696,17 +698,15 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @param               $appInstance                    An application helper instance or
         *                                                                              null if we shall use the default
-        * @return              $templateInstance                               The template engine instance
+        * @return              $templateInstance               The template engine instance
         * @throws              NullPointerException    If the template engine could not
         *                                                                              be initialized
         * @throws              UnsupportedTemplateEngineException      If $templateInstance is an
         *                                                                              unsupported template engine
-        * @throws              MissingLanguageHandlerException If the language sub-system
-        *                                                                              is not yet initialized
         * @throws              NullPointerException    If the discovered application
         *                                                                              instance is still null
         */
-       protected function prepareTemplateInstance (FrameworkInterface $appInstance=null) {
+       protected function prepareTemplateInstance (ManageableApplication $appInstance = null) {
                // Is the application instance set?
                if (is_null($appInstance)) {
                        // Get the current instance
@@ -719,15 +719,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        } // END - if
                } // END - if
 
-               // Are both instances set?
-               if ($appInstance->getLanguageInstance() === null) {
-                       // Invalid language instance
-                       throw new MissingLanguageHandlerException($appInstance, self::EXCEPTION_MISSING_LANGUAGE_HANDLER);
-               } elseif ($appInstance->getFileIoInstance() === null) {
-                       // Invalid language instance
-                       throw new MissingFileIoHandlerException($appInstance, self::EXCEPTION_MISSING_FILE_IO_HANDLER);
-               }
-
                // Initialize the template engine
                $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class', array($appInstance));
 
index 54b1841dff5966cccca09af25eb08704692c6d17..854a8888e73dd5a2068abed98668e67d20c75fb1 100644 (file)
@@ -92,18 +92,15 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         * Create an object of LocalFileDatabase and set the save path for local files.
         * This method also validates the given file path.
         *
-        * @param               $savePath               The local file path string
-        * @param               $ioInstance             The input/output handler. This
-        *                                                              should be FileIoHandler
-        * @return      $dbInstance                     An instance of LocalFileDatabase
+        * @param       $savePath               The local file path string
+        * @return      $dbInstance             An instance of LocalFileDatabase
         */
-       public static final function createLocalFileDatabase ($savePath, FileIoHandler $ioInstance) {
+       public static final function createLocalFileDatabase ($savePath) {
                // Get an instance
                $databaseInstance = new LocalFileDatabase();
 
                // Set save path and IO instance
                $databaseInstance->setSavePath($savePath);
-               $databaseInstance->setFileIoInstance($ioInstance);
 
                // Set the compressor channel
                $databaseInstance->setCompressorChannel(CompressorChannel::createCompressorChannel(
index 89570fd2c52d37249340a975d61deb54457b039d..2b9406b0f055efe0948579aae92ef378b696d306 100644 (file)
@@ -156,6 +156,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
+
+               // Init file I/O instance
+               $ioInstance = ObjectFactory::createObjectByConfiguredName('file_io_class');
+
+               // Set it
+               $this->setFileIoInstance($ioInstance);
        }
 
        /**
index 016a108b8c53d5d3ffcbc1a3d48e85eb04d9c29f..aae8d6c8951faf482938598e1d76643f75c5ec62 100644 (file)
@@ -49,10 +49,6 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
                // Get a new instance
                $templateInstance = new ConsoleTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -74,10 +70,6 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
index d0cba615f99d6724c9b9866634ae9b036357f4cb..3a692e1f2fc5c886224f75f319d33cbffa604e16 100644 (file)
@@ -82,10 +82,6 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                // Get a new instance
                $templateInstance = new ImageTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -107,10 +103,6 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
index f4b4f692083530d8bb20d3c1ad7fb6625e199c10..1afb1f005efb3979bc2e26d69ffe32c764a40106 100644 (file)
@@ -76,10 +76,6 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Get a new instance
                $templateInstance = new MailTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -101,10 +97,6 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
index b8fb5fe6dee560f8d520173da091570cc8f3a929..9e02404733abe72afa4a6fa6f10c85f1bcb5819a 100644 (file)
@@ -99,10 +99,6 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Get a new instance
                $templateInstance = new MenuTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -124,10 +120,6 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
index 6033ef59d69cd2448f39d7ba03d719ea66312d64..ef473dc02b7c28ec7f765b3e22997dd19e1daf1d 100644 (file)
@@ -49,10 +49,6 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                // Get a new instance
                $templateInstance = new WebTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -74,10 +70,6 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
index aa4dc2e6d018b0d950d14289c7e183e4c7e1b6a0..7ca9530c5ac24f9729b46173438a91b19d21a44d 100644 (file)
@@ -24,8 +24,7 @@
 
 // For testing purposes we use a local file database
 $databaseInstance = LocalFileDatabase::createLocalFileDatabase(
-       FrameworkConfiguration::getInstance()->getConfigEntry('local_db_path'),
-       FileIoHandler::getInstance()
+       FrameworkConfiguration::getInstance()->getConfigEntry('local_db_path')
 );
 
 // [EOF]
index cd64b1a09c4eac3395e376a25bfe1bbddcfc5a13..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,36 +1,3 @@
 <?php
-/**
- * Initialize the file I/O handler. Currently there is no need to check if
- * the initialization was successfull or not because only some class
- * instances will we generated.
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- * @deprecated
- * @todo               We should minimize these includes
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Get the instance
-$io = ObjectFactory::createObjectByConfiguredName('file_io_class');
-
-// Is the app variable there and valid?
-if (is_object($app)) $app->setFileIoInstance($io);
-
-// [EOF]
+// @DEPRECATED
 ?>
index 52dbea7da82989f45d28c3369ea569bfa15dd7a6..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,37 +1,3 @@
 <?php
-/**
- * Try to initializes the language system
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @deprecated
- * @todo               We should minimize these includes
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Try to instance the language system
-$lang = LanguageSystem::createLanguageSystem(
-       FrameworkConfiguration::getInstance()->getConfigEntry('base_path').
-       FrameworkConfiguration::getInstance()->getConfigEntry('lang_base_path')
-);
-
-// Is the app variable there and valid?
-// @TODO Rewrite this
-if (is_object($app)) $app->setLanguageInstance($lang);
-
-// [EOF]
+// @DEPRECATED
 ?>
index 9322c4da0afc470959493f08ec64f3469b4848bb..601b06d95d539b8bb650f917d318657dc593ff05 100644 (file)
@@ -205,7 +205,9 @@ class ClassLoader {
         */
        public function __destruct () {
                // Skip here if dev-mode
-               if (defined('DEVELOPER')) return;
+               if (defined('DEVELOPER')) {
+                       return;
+               } // END - if
 
                // Skip here if already cached
                if ($this->listCached === false) {
@@ -240,7 +242,7 @@ class ClassLoader {
                if ($this->listCached === true) {
                        // Abort here
                        return;
-               }
+               } // END - if
 
                // Directories which our class loader ignores by default while
                // deep-scanning the directory structure.