inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php -text
inc/classes/exceptions/main/class_DimNotFoundInArrayException.php -text
inc/classes/exceptions/main/class_EmptyVariableException.php -text
-inc/classes/exceptions/main/class_ExceptionNotChangedException.php -text
inc/classes/exceptions/main/class_ExceptionNotFoundException.php -text
inc/classes/exceptions/main/class_FatalErrorException.php -text
inc/classes/exceptions/main/class_GetterNotFoundException.php -text
inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php -text
inc/classes/exceptions/template/class_BasePathReadProtectedException.php -text
inc/classes/exceptions/template/class_InvalidBasePathStringException.php -text
-inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php -text
inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php -text
inc/classes/exceptions/template/class_UnsupportedTemplateEngineException.php -text
inc/classes/exceptions/template/class_ViewHelperNotFoundException.php -text
inc/classes/interfaces/database/middleware/class_DatabaseConnector.php -text
inc/classes/interfaces/debug/.htaccess -text
inc/classes/interfaces/debug/class_Debugger.php -text
-inc/classes/interfaces/extended/.htaccess -text
-inc/classes/interfaces/extended/class_LimitableObject.php -text
inc/classes/interfaces/filter/.htaccess -text
inc/classes/interfaces/filter/class_Filterable.php -text
inc/classes/interfaces/helper/.htaccess -text
* of a class.
*/
public function loadPersonellList ($idNumber) {
- // Get database instance
- $dbInstance = $this->getDatabaseInstance();
-
- // Get the serialization container within the personell list from
- // the database layer
- $containerInstance = $dbInstance->getObjectFromCachedData($idNumber);
-
- // Iterate through the whole container
- for ($idx = $containerInstance->getIterator(); $idx->valid(); $idx->next()) {
- // Get current item from container
- $item = $idx->current();
-
- // Validate it a bit
- if (is_null($item)) {
- // Is null
- throw new ContainerItemIsNullException($this, self::EXCEPTION_CONTAINER_ITEM_IS_NULL);
- } elseif (!is_array($item)) {
- // Is not an array
- throw new ContainerItemIsNoArrayException($this, self::EXCEPTION_ITEM_IS_NO_ARRAY);
- } elseif ((!isset($item['name'])) || (!isset($item['value']))) {
- // Missing elements
- throw new ContainerMaybeDamagedException($this, self::EXCEPTION_CONTAINER_MAYBE_DAMAGED);
- }
-
- // Okay, now we can get the item and generate a valid command for eval().
- // We need to convert the first letter to lower-case but keep all others intact
- $eval = sprintf("\$this->%s = \$item['value'];",
- strtolower(substr($item['name'], 0, 1))
- .
- substr($item['name'], 1)
- );
-
- // Debug message
- if ((defined('DEBUG_EVAL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruierte PHP-Anweisung: <pre><em>%s</em></pre><br />\n",
- __CLASS__,
- __LINE__,
- htmlentities($eval)
- ));
-
- // Run the command
- @eval($eval);
- }
+ // Cleared because old code
+ $this->partialStub("Clear because of old lost code was usaged.");
}
}
$e->getMessage()
));
return false;
- } catch (ExceptionNotChangedException $e) {
- if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Eine Exception wurde nicht geändert. Details: <strong>%s</strong><br />\n",
- __CLASS__,
- __LINE__,
- $e->getMessage()
- ));
- return false;
} catch (ExceptionNotFoundException $e) {
if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Eine Exception wurde nicht gefunden. Details: <strong>%s</strong><br />\n",
__CLASS__,
+++ /dev/null
-<?php
-/**
- * An exception thrown when an exception was not changed
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @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 ExceptionNotChangedException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $message Message from the exception
- * @param $code Code number for the exception
- * @return void
- */
- public function __construct (BaseFrameworkSystem $class, $code) {
- // Add a message around the missing class
- $message = sprintf("[%s:%d] Exception(s) wurde(n) nicht geändert.",
- $class,
- $this->getLine()
- );
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * An exception thrown when a template variable name is invalid
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @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 InvalidTemplateVariableNameException extends FrameworkException {
- /**
- * The constructor
- *
- * @param $classArray An array holding our informations
- * @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] The template <u>%s</u> contains an invalid variable called <u>%s</u>. Valid variable names are only <u>%s</u>.",
- $classArray[0]->__toString(),
- $this->getLine(),
- basename($classArray[1]),
- $classArray[2],
- $classArray[3]->readConfig('tpl_valid_var')
- );
-
- // Call parent constructor
- parent::__construct($message, $code);
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-/**
- * This is an inface for limiting object while saving them with the
- * DatabaseConnection class.
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- * @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/>.
- */
-interface LimitableObject extends FrameworkInterface {
- /**
- * Reduces the volume of a processed object.
- *
- * @param $limitInstance An instance to ObjectLimits which holds
- * attribute names that we want to include
- * in the processing phase. Other attributes
- * except $uniqueID and $realClass will be
- * ignored and keept out.
- * @return void
- */
- function limitObject (ObjectLimits $limitInstance);
-}
-
-// [EOF]
-?>
return $this->fileExtension;
}
- /**
- * Get cached (last fetched) data from the local file database
- *
- * @param $uniqueID The ID number for looking up the data
- * @return $object The restored object from the maybe compressed
- * serialized data
- * @throws MismatchingCompressorsException If the compressor from
- * the loaded file
- * mismatches with the
- * current used one.
- * @throws NullPointerException If the restored object
- * is null
- * @throws NoObjectException If the restored "object"
- * is not an object instance
- * @throws MissingMethodException If the required method
- * toString() is missing
- * @deprecated
- */
- public final function getObjectFromCachedData ($uniqueID) {
- // Get instance for file handler
- $inputHandler = $this->getFileIoInstance();
-
- // Get last file's name and contents
- $fqfn = $this->repairFQFN($this->getLastFile(), $uniqueID);
- $contents = $this->repairContents($this->getLastContents(), $fqfn);
-
- // Let's decompress it. First we need the instance
- $compressInstance = $this->getCompressorChannel();
-
- // Is the compressor's extension the same as the one from the data?
- if ($compressInstance->getCompressorExtension() != $contents['header'][0]) {
- /**
- * @todo For now we abort here but later we need to make this a little more dynamic.
- */
- throw new MismatchingCompressorsException(array($this, $contents['header'][0], $fqfn, $compressInstance->getCompressorExtension()), self::EXCEPTION_MISMATCHING_COMPRESSORS);
- }
-
- // Decompress the data now
- $serialized = $compressInstance->getCompressor()->decompressStream($contents['data']);
-
- // And unserialize it...
- $object = unserialize($serialized);
-
- // This must become a valid object, so let's check it...
- if (is_null($object)) {
- // Is null, throw exception
- throw new NullPointerException($object, self::EXCEPTION_IS_NULL_POINTER);
- } elseif (!is_object($object)) {
- // Is not an object, throw exception
- throw new NoObjectException($object, self::EXCEPTION_IS_NO_OBJECT);
- } elseif (!$object instanceof FrameworkInterface) {
- // A highly required method was not found... :-(
- throw new MissingMethodException(array($object, '__toString'), self::EXCEPTION_MISSING_METHOD);
- }
-
- // And return the object
- return $object;
- }
-
- /**
- * Private method for re-gathering (repairing) the FQFN
- *
- * @param $fqfn The current FQFN we shall validate
- * @param $uniqueID The unique ID number
- * @return $fqfn The repaired FQFN when it is empty
- * @throws NoArrayCreatedException If explode() has not
- * created an array
- * @throws InvalidArrayCountException If the array count is not
- * as the expected
- * @deprecated
- */
- private function repairFQFN ($fqfn, $uniqueID) {
- // Cast both strings
- $fqfn = (string) $fqfn;
- $uniqueID = (string) $uniqueID;
-
- // Is there pre-cached data available?
- if (empty($fqfn)) {
- // Split the unique ID up in path and file name
- $pathFile = explode("@", $uniqueID);
-
- // Are there two elements? Index 0 is the path, 1 the file name + global extension
- if (!is_array($pathFile)) {
- // No array found
- throw new NoArrayCreatedException(array($this, "pathFile"), self::EXCEPTION_ARRAY_EXPECTED);
- } elseif (count($pathFile) != 2) {
- // Invalid ID returned!
- throw new InvalidArrayCountException(array($this, "pathFile", count($pathFile), 2), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT);
- }
-
- // Create full path name
- $pathName = $this->getSavePath() . $pathFile[0];
-
- // Nothing cached, so let's create a FQFN first
- $fqfn = sprintf("%s/%s.%s", $pathName, $pathFile[1], $this->getFileExtension());
- $this->setLastFile($fqfn);
- }
-
- // Return repaired FQFN
- return $fqfn;
- }
-
- /**
- * Private method for re-gathering the contents of a given file
- *
- * @param $contents The (maybe) already cached contents as an array
- * @param $fqfn The current FQFN we shall validate
- * @return $contents The repaired contents from the given file
- * @deprecated
- */
- private function repairContents ($contents, $fqfn) {
- // Is there some content and header (2 indexes) in?
- if ((!is_array($contents)) || (count($contents) != 2) || (!isset($contents['header'])) || (!isset($contents['data']))) {
- // No content found so load the file again
- $contents = $inputHandler->loadFileContents($fqfn);
-
- // And remember all data for later usage
- $this->setLastContents($contents);
- }
-
- // Return the repaired contents
- return $contents;
- }
-
/**
* Reads a local data file and returns it's contents in an array
*