./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
./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
<?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
?>
<?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
?>
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;
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;
*/
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;
}
*
* @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
} // 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));
* 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(
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);
}
/**
// 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') . '/';
// 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'));
// 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') . '/';
// 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'));
// 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') . '/';
// 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'));
// 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') . '/';
// 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'));
// 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') . '/';
// 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'));
// 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]
<?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
?>
<?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
?>
*/
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) {
if ($this->listCached === true) {
// Abort here
return;
- }
+ } // END - if
// Directories which our class loader ignores by default while
// deep-scanning the directory structure.