inc/classes/exceptions/main/class_MissingArrayElementsException.php -text
inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php -text
inc/classes/exceptions/main/class_MissingMethodException.php -text
+inc/classes/exceptions/main/class_NoClassException.php -text
+inc/classes/exceptions/main/class_NoConfigEntryException.php -text
inc/classes/exceptions/main/class_NullPointerException.php -text
inc/classes/exceptions/main/class_ResponseHeadersAlreadySentException.php -text
inc/classes/exceptions/main/class_VariableIsNotSetException.php -text
### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ###
### DO NOT EDIT THIS FILE. ###
-./inc/classes/exceptions/io/class_FileNotFoundException.php:10: * @todo Rename this class to FileIoException
-./inc/classes/exceptions/main/class_ClassNotFoundException.php:10: * @todo Rename this class to NoClassException
-./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:10: * @todo Rename this class to NoFoundEntryException
./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:1078: * @todo Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1092: // @TODO Finish this part!
-./inc/classes/main/class_BaseFrameworkSystem.php:119: // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:200: * @todo This is old code. Do we still need this old lost code?
-./inc/classes/main/class_BaseFrameworkSystem.php:268: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:1083: * @todo Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1097: // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:124: // @todo Try to clean these constants up
+./inc/classes/main/class_BaseFrameworkSystem.php:205: * @todo This is old code. Do we still need this old lost code?
+./inc/classes/main/class_BaseFrameworkSystem.php:273: * @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/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:810: * @todo Unfinished work or don't die here.
-./inc/classes/main/template/class_BaseTemplateEngine.php:827: // @TODO Non-string found so we need some deeper analysis...
-./inc/classes/main/template/class_BaseTemplateEngine.php:904: // @TODO Old behaviour, will become obsolete!
-./inc/classes/main/template/class_BaseTemplateEngine.php:907: // @TODO Yet another old way
-./inc/classes/main/template/class_BaseTemplateEngine.php:983: * @todo Make this code some nicer...
+./inc/classes/main/template/class_BaseTemplateEngine.php:804: * @todo Unfinished work or don't die here.
+./inc/classes/main/template/class_BaseTemplateEngine.php:821: // @TODO Non-string found so we need some deeper analysis...
+./inc/classes/main/template/class_BaseTemplateEngine.php:898: // @TODO Old behaviour, will become obsolete!
+./inc/classes/main/template/class_BaseTemplateEngine.php:901: // @TODO Yet another old way
+./inc/classes/main/template/class_BaseTemplateEngine.php:977: * @todo Make this code some nicer...
./inc/classes/main/template/image/class_ImageTemplateEngine.php:224: * @todo Find something usefull with this!
./inc/classes/main/template/image/class_ImageTemplateEngine.php:244: * @todo Add cache creation here
./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:270: * @todo Find something useful with this!
-./inc/classes/main/template/menu/class_MenuTemplateEngine.php:315: * @todo Add cache creation here
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:276: * @todo Find something useful with this!
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:322: * @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/classes/middleware/debug/class_DebugMiddleware.php:112: // @TODO Initialization phase
+./inc/classes.php:10: * @todo We should minimize these includes
./inc/config/class_FrameworkConfiguration.php:172: * @todo We have to add some more entries from $_SERVER here
-./inc/database.php:49:// @TODO Rewrite this
-./inc/hooks.php:26:// @TODO This makes the core depending on the SPL. But it should be installed anyway.
-./inc/includes.php:36:// @TODO Find a nicer OOP-ed way for this
-./inc/language.php:31:// @TODO Rewrite this
+./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/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:11: * @deprecated
-./inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php:10: * @deprecated
-./inc/classes/exceptions/main/class_ClassNotFoundException.php:11: * @deprecated
-./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:11: * @deprecated
-./inc/classes/main/template/class_BaseTemplateEngine.php:1133: * @deprecated
-./inc/classes/main/template/class_BaseTemplateEngine.php:953: * @deprecated
+./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/main/class_ClassNotFoundException.php:2:// @DEPRECATED
+./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:2:// @DEPRECATED
+./inc/classes/main/template/class_BaseTemplateEngine.php:1127: * @deprecated
+./inc/classes/main/template/class_BaseTemplateEngine.php:947: * @deprecated
+./inc/classes.php:9: * @deprecated
+./inc/database.php:10: * @deprecated
+./inc/file_io.php:12: * @deprecated
+./inc/hooks.php:10: * @deprecated
+./inc/includes.php:10: * @deprecated
+./inc/language.php:9: * @deprecated
+./inc/output.php:10: * @deprecated
+./inc/selector.php:10: * @deprecated
* @version 0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
<?php
-/**
- * An exception thrown when a file was not found
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Rename this class to FileIoException
- * @deprecated
- *
- * 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 FileNotFoundException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $fqfn Full-qualified file name of (maybe) missing file
- * @param $code Code number for the exception
- * @return void
- */
- public function __construct ($fqfn, $code) {
- // Add a message around the missing class
- $message = sprintf("The requested file <span class=\"exception_reason\">%s</span> was not found.",
- $fqfn
- );
-
- // Set extra data
- $this->setExtraData(basename($fqfn));
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * An exception thrown when a file pointer is not opened
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 FilePointerNotOpenedException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $fqfn Full-qualified file name of (maybe) missing file
- * @param $code Code number for the exception
- * @return void
- */
- public function __construct ($fqfn, $code) {
- // Add a message around the missing class
- $message = sprintf("Not able to initialize a pointer for the file <span class=\"exception_reason\">%s</span>. Maybe the file is missing.", $fqfn);
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * An exception thrown when the returned directory resource is invalid
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @deprecated
- * @see InvalidResourceException
- *
- * 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 InvalidDirectoryResourceException 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] Has an invalid directory resource.",
- $class->__toString(),
- $this->getLine()
- );
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * An exception thrown when a class was not found
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Rename this class to NoClassException
- * @deprecated
- *
- * 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 ClassNotFoundException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $msgArray Message from the exception
- * @param $code Code number for the exception
- * @return void
- */
- public function __construct (array $msgArray, $code) {
- // Add a message around the missing class
- $message = sprintf("[%s:%d] Internal class <span class=\"exception_reason\">%s</span> not found.",
- $msgArray[0]->__toString(),
- $this->getLine(),
- $msgArray[1]
- );
-
- // Set extra data
- $this->setExtraData($msgArray[1]);
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * An exception thrown when a configuration entry is not found
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @todo Rename this class to NoFoundEntryException
- * @deprecated
- *
- * 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 ConfigEntryNotFoundException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $classArray Array with exception data
- * @param $code Code number for the exception
- * @return void
- */
- public function __construct (array $classArray, $code) {
- // Add a message around the missing class
- $message = sprintf("[%s:%d] Configuration entry <span class=\"exception_reason\">%s</span> not found.",
- $classArray[0],
- $this->getLine(),
- $classArray[1]
- );
-
- // Set extra data
- $this->setExtraData($classArray[1].':'.$this->getLine());
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+<?php
+/**
+ * An exception thrown when a class was not found
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 NoClassException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $msgArray Message from the exception
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $msgArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Internal class <span class=\"exception_reason\">%s</span> not found.",
+ $msgArray[0]->__toString(),
+ $this->getLine(),
+ $msgArray[1]
+ );
+
+ // Set extra data
+ $this->setExtraData($msgArray[1]);
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * An exception thrown when a configuration entry is not found
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Rename this class to NoFoundEntryException
+ *
+ * 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 NoConfigEntryException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $classArray Array with exception data
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $classArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Configuration entry <span class=\"exception_reason\">%s</span> not found.",
+ $classArray[0],
+ $this->getLine(),
+ $classArray[1]
+ );
+
+ // Set extra data
+ $this->setExtraData($classArray[1].':'.$this->getLine());
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
// Resolve the IP number
$ip = $helper->resolveIpAddress($hostname);
- } catch (FileNotFoundException $e) {
+ } catch (FileIoException $e) {
// Fall-back to 'SESSION_SVR' which found on my Sun Station
if (isset($_SERVER['SESSION_SVR'])) {
// Resolve it
// Return determined external IP
return $externalAddress;
}
+
+ /**
+ * Analyzes the 'environment', mostly $_SERVER, for presence of elements
+ * which indicates clearly that e.g. this script has been executed from
+ * console or web.
+ *
+ * @return $type The analyzed type, can be 'http' or 'console'
+ */
+ public static function analyzeEnvironmentForType () {
+ // Default is the console
+ $type = 'console';
+
+ // Now, do we have a request method, or query string set?
+ if ((isset($_SERVER['REQUEST_METHOD'])) || (isset($_SERVER['QUERY_STRING']))) {
+ // Possibly HTTP request
+ $type = 'http';
+ } // END - if
+
+ // Return it
+ return $type;
+ }
+
+ /**
+ * Analyzes the 'environment', mostly $_SERVER, for presence of elements
+ * which indicates clearly that e.g. this script has been executed from
+ * console or web. This method should be used for class names, they
+ * currently are named differently. Here is a list to clarify this:
+ *
+ * Request type | Class type
+ * -----------------------------
+ * http | web
+ * console | console
+ *
+ * @return $type The analyzed type, can be 'http' or 'console'
+ */
+ public static function analyzeEnvironmentForClassType () {
+ // Default is the console
+ $type = 'console';
+
+ // Now, do we have a request method, or query string set?
+ if ((isset($_SERVER['REQUEST_METHOD'])) || (isset($_SERVER['QUERY_STRING']))) {
+ // Possibly HTTP request
+ $type = 'web';
+ } // END - if
+
+ // Return it
+ return $type;
+ }
}
// [EOF]
// Get the file contents
try {
$infoArray = $this->getDataArrayFromFile($fqfn);
- } catch (FileNotFoundException $e) {
+ } catch (FileIoException $e) {
// Not found, so ignore it here
}
* @param $className Name of the class we shall construct
* @param $args Arguments in an indexed array
* @return $objectInstance An instance of the requested object
- * @throws ClassNotFoundException If the requested class was not found
+ * @throws NoClassException If the requested class was not found
* @throws EmptyVariableException If a variable is empty unexpectly
*/
public final static function createObjectByName ($className, array $args=array()) {
throw new EmptyVariableException(array($factoryInstance, 'className'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (!class_exists($className)) {
// Then throw an exception
- throw new ClassNotFoundException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
+ throw new NoClassException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
}
// Create method name
* @return void
* @throws UserAuthorizationException If the auth login was not found or if it was invalid
* @throws UserPasswordMismatchException If the supplied password hash does not match
- * @throws ClassNotFoundException If the user (guest/member) class was not found
+ * @throws NoClassException If the user (guest/member) class was not found
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Then get an auth instance for checking and updating the auth cookies
// Does the guest class exist?
if (!class_exists($className)) {
// Then abort here
- throw new ClassNotFoundException (array($this, $className), self::EXCEPTION_CLASS_NOT_FOUND);
+ throw new NoClassException (array($this, $className), self::EXCEPTION_CLASS_NOT_FOUND);
} // END - if
// Now try the dynamic login
// Remember this instance if all wents fine
Registry::getRegistry()->addInstance('payments', $discoveryInstance);
- } catch (ConfigEntryNotFoundException $e) {
+ } catch (NoConfigEntryException $e) {
// Something bad happend
$requestInstance->requestIsValid(false);
// Abort here
throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
- } catch (ClassNotFoundException $e) {
+ } catch (NoClassException $e) {
// Something bad happend
$requestInstance->requestIsValid(false);
* @param $linkName Name of the link we shall generate
* @param $linkBase Link base for the link. This parameter is deprecated.
* @return $helperInstance A prepared instance of this helper
- * @throws ConfigEntryNotFoundException A deprecated exception at this point
+ * @throws NoConfigEntryException A deprecated exception at this point
*/
public final static function createWebLinkHelper (CompileableTemplate $templateInstance, $linkName, $linkBase = null) {
// Get new instance
try {
$newLinkBase = $helperInstance->getConfigInstance()->getConfigEntry($configEntry);
$linkBase = $newLinkBase;
- } catch (ConfigEntryNotFoundException $e) {
+ } catch (NoConfigEntryException $e) {
// Is the deprecated linkBase not set?
if (is_null($linkBase)) {
// Then throw again the exception
- throw new ConfigEntryNotFoundException(array(__CLASS__, ($configEntry)), FrameworkConfiguration::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
+ throw new NoConfigEntryException(array(__CLASS__, ($configEntry)), FrameworkConfiguration::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
} // END - if
}
// Get a file output pointer
try {
$fileInstance = FrameworkFileOutputPointer::createFrameworkFileOutputPointer($fileName, 'w');
- } catch (FilePointerNotOpenedException $e) {
+ } catch (FileIoException $e) {
// Create missing directory
$dirName = dirname($fileName);
for ($idx2 = 0; $idx2 < (2 - $idx); $idx2++) {
*
* @param $fileName The file name we shall pass to fopen()
* @throws FileIsEmptyException If the provided file name is empty.
- * @throws FilePointerNotOpenedException If fopen() returns not a
- * file resource
+ * @throws FileIoException If fopen() returns not a file resource
* @return void
*/
public final static function createFrameworkFileInputPointer ($fileName) {
throw new FileIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (!file_exists($fileName)) {
// File does not exist!
- throw new FileNotFoundException($fileName, self::EXCEPTION_FILE_NOT_FOUND);
+ throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_FOUND);
} elseif (!is_readable($fileName)) {
// File does not exist!
throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
$filePointer = @fopen($fileName, 'rb');
if ((is_null($filePointer)) || ($filePointer === false)) {
// Something bad happend
- throw new FilePointerNotOpenedException ($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
+ throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
} // END - if
// Create new instance
* @param $fileName The file name we shall pass to fopen()
* @param $mode The output mode ('w', 'a' are valid)
* @throws FileIsEmptyException If the provided file name is empty.
- * @throws FilePointerNotOpened If fopen() returns not a file
- * resource
+ * @throws FileIoException If fopen() returns not a file resource
* @return void
*/
public final static function createFrameworkFileOutputPointer ($fileName, $mode) {
if (is_null($fileName)) {
// No filename given
throw new FileIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- }
+ } // END - if
// Try to open a handler
$filePointer = @fopen($fileName, $mode);
if (($filePointer === null) || ($filePointer === false)) {
// Something bad happend
- throw new FilePointerNotOpenedException ($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
- }
+ throw new FileIoException ($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
+ } // END - if
// Create new instance
$pointerInstance = new FrameworkFileOutputPointer();
// Load the menu template for this page
try {
$this->getTemplateInstance()->loadMenuTemplate($page . '_menu_entries');
- } catch (FileNotFoundException $e) {
+ } catch (FileIoException $e) {
// @TODO Should we log it here? We should, because it will be silently ignored.
}
* @param $template The template we shall load
* @param $extOther An other extension to use
* @return void
- * @throws FileNotFoundException If the template was not found
+ * @throws FileIoException If the template was not found
*/
protected function loadTemplate ($template, $extOther = '') {
// Get extension for the template if empty
try {
// Load the raw template data
$this->loadRawTemplateData($fqfn);
- } catch (FileNotFoundException $e) {
+ } catch (FileIoException $e) {
// If we shall load a code-template we need to switch the file extension
if (($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('web_template_type')) && (empty($extOther))) {
// Switch over to the code-template extension and try it again
$this->loadTemplate($template, $ext);
} else {
// Throw it again
- throw new FileNotFoundException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND);
+ throw new FileIoException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND);
}
}
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
$this->loadedTemplates[] = $template;
- } catch (FileNotFoundException $e) {
- // Even this is not done... :/
- $this->rawTemplates[] = $template;
- } catch (FilePointerNotOpenedException $e) {
+ } catch (FileIoException $e) {
// Even this is not done... :/
$this->rawTemplates[] = $template;
}
// Remember this template for recursion detection
// RECURSIVE PROTECTION!
$this->loadedTemplates[] = $template;
- } catch (FileNotFoundException $e) {
- // This template was never found. We silently ignore it
- unset($this->rawTemplates[$key]);
- } catch (FilePointerNotOpenedException $e) {
+ } catch (FileIoException $e) {
// This template was never found. We silently ignore it
unset($this->rawTemplates[$key]);
}
* @param $cfgEntry The configuration element
* @return $cfgValue The fetched configuration value
* @throws ConfigEntryIsEmptyException If $cfgEntry is empty
- * @throws ConfigEntryNotFoundException If a configuration element
+ * @throws NoConfigEntryException If a configuration element
* was not found
*/
public function getConfigEntry ($cfgEntry) {
throw new ConfigEntryIsEmptyException($this, self::EXCEPTION_CONFIG_ENTRY_IS_EMPTY);
} elseif (!$this->isConfigurationEntrySet($cfgEntry)) {
// Entry was not found!
- throw new ConfigEntryNotFoundException(array(__CLASS__, $cfgEntry), self::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
+ throw new NoConfigEntryException(array(__CLASS__, $cfgEntry), self::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND);
}
// Return the requested value
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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