parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Application-Helper");
+ $this->setObjectDescription("Application-Helper");
// Create an unique ID
$this->createUniqueID();
$message = sprintf("[%s:%d] Objekte sind nicht erlaubt. (Objekt: <u>%s</u>)",
$class->__toString(),
$this->getLine(),
- $class->getPartDescr()
+ $class->getObjectDescription()
);
// Call parent constructor
/**
* A human-readable description for this simulator part
*/
- private $partDescr = "Namenlose Framework-Einheit";
+ private $objectDescription = "Namenlose Framework-Einheit";
/**
* The unique ID string for identifying all type of classes
const EXCEPTION_TEMPLATE_ENGINE_UNSUPPORTED = 0x02d;
const EXCEPTION_MISSING_LANGUAGE_HANDLER = 0x02e;
const EXCEPTION_MISSING_FILE_IO_HANDLER = 0x02f;
+ const EXCEPTION_MISSING_ELEMENT = 0x030;
/**
* In the super constructor these system classes shall be ignored or else
}
// Destroy all informations about this class but keep some text about it alive
- $this->setPartDescr(sprintf("Entferntes Objekt <em>%s</em>", $this->__toString()));
+ $this->setObjectDescription(sprintf("Entferntes Objekt <em>%s</em>", $this->__toString()));
$this->setRealClass("DestructedObject");
$this->resetUniqueID();
} elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
$this->__toString(),
md5(sprintf("%s:%s:%s:%s:%s:%s",
$this->__toString(),
- $this->getPartDescr(),
+ $this->getObjectDescription(),
time(),
getenv('REMOTE_ADDR'),
getenv('SERVER_ADDR'),
/**
* Getter for simulator description
*
- * @return $partDescr The description of this simulation part
+ * @return $objectDescription The description of this simulation part
*/
- public final function getPartDescr () {
- if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] getPartDescr erreicht.<br />\n",
+ public final function getObjectDescription () {
+ if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] getObjectDescription erreicht.<br />\n",
$this->__toString()
));
- if (isset($this->partDescr)) {
- return $this->partDescr;
+ if (isset($this->objectDescription)) {
+ return $this->objectDescription;
} else {
return null;
}
/**
* Setter for simulation part description
*
- * @param $partDescr The description as string for this simulation part
+ * @param $objectDescription The description as string for this simulation part
* @return void
*/
- public final function setPartDescr ($partDescr) {
- $this->partDescr = (String) $partDescr;
+ public final function setObjectDescription ($objectDescription) {
+ $this->objectDescription = (String) $objectDescription;
if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Teilbeschreibung wird auf <strong>%s</strong> gesetzt.<br />\n",
$this->__toString(),
- $this->partDescr
+ $this->objectDescription
));
}
(
$this->__toString() == $itemInstance->__toString()
) && (
- $this->getPartDescr() == $itemInstance->getPartDescr()
+ $this->getObjectDescription() == $itemInstance->getObjectDescription()
)
);
}
));
// Set description
- $this->setPartDescr("BZIP2-Kompressor");
+ $this->setObjectDescription("BZIP2-Kompressor");
// Create an unique ID
$this->createUniqueID();
));
// Set description
- $this->setPartDescr("GZIP-Kompressor");
+ $this->setObjectDescription("GZIP-Kompressor");
// Create an unique ID
$this->createUniqueID();
/**
* GZIP compression stream
*
- * @param $streamData Mixed non-object stream data
- * @return $streamData The compressed stream data
+ * @param $streamData Mixed non-object stream data
+ * @return $streamData The compressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function compressStream ($streamData) {
/**
* GZIP decompression stream
*
- * @param $streamData Mixed non-object stream data
- * @return $streamData The decompressed stream data
+ * @param $streamData Mixed non-object stream data
+ * @return $streamData The decompressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function decompressStream ($streamData) {
));
// Set description
- $this->setPartDescr("Null-Kompressor");
+ $this->setObjectDescription("Null-Kompressor");
// Create an unique ID
$this->createUniqueID();
/**
* Null compression stream
*
- * @param $streamData Mixed non-object stream data
- * @return $streamData The compressed stream data
+ * @param $streamData Mixed non-object stream data
+ * @return $streamData The compressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function compressStream ($streamData) {
/**
* Null decompression stream
*
- * @param $streamData Mixed non-object stream data
- * @return $streamData The decompressed stream data
+ * @param $streamData Mixed non-object stream data
+ * @return $streamData The decompressed stream data
* @throws InvalidObjectException If the stream is an object
*/
public function decompressStream ($streamData) {
/**
* Getter for the file extension of this compressor
*
- * @return $string Returns always "bz2"
+ * @return $string Returns always "null"
*/
public final function getCompressorExtension () {
if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Dateierweiterung angefordert.<br />\n",
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Console-Tools");
+ $this->setObjectDescription("Console-Tools");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Dateidatenbankschicht");
+ $this->setObjectDescription("Dateidatenbankschicht");
// Create unique ID
$this->createUniqueID();
return $this->lastContents;
}
+ /**
+ * Getter for file extension
+ *
+ * @return $fileExtension The array with elements 'header' and 'data'.
+ */
+ public final function getFileExtension () {
+ return $this->fileExtension;
+ }
+
/**
* Get cached (last fetched) data from the local file database
*
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Debug-Ausgabe auf Konsole");
+ $this->setObjectDescription("Debug-Ausgabe auf Konsole");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Debug-Ausgabe in error_log()");
+ $this->setObjectDescription("Debug-Ausgabe in error_log()");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Debug-Ausgabe auf Konsole");
+ $this->setObjectDescription("Debug-Ausgabe auf Konsole");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Limitierungsobjekt");
+ $this->setObjectDescription("Limitierungsobjekt");
// Create unique ID number
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Universal Datei-Ein-/Ausgabesystem");
+ $this->setObjectDescription("Universal Datei-Ein-/Ausgabesystem");
// Create unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Verzeichnis-Handler");
+ $this->setObjectDescription("Verzeichnis-Handler");
// Create unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Dateiausgabe-Handler");
+ $this->setObjectDescription("Dateiausgabe-Handler");
// Create unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Dateiausgabe-Handler");
+ $this->setObjectDescription("Dateiausgabe-Handler");
// Create unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Sprachsystem");
+ $this->setObjectDescription("Sprachsystem");
// Create unique ID number
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Console-Ausgabe-Handler");
+ $this->setObjectDescription("Console-Ausgabe-Handler");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Web-Ausgabe-Handler");
+ $this->setObjectDescription("Web-Ausgabe-Handler");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set part description
- $this->setPartDescr("Template-Engine");
+ $this->setObjectDescription("Template-Engine");
// Create unique ID number
$this->createUniqueID();
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $basePath The local base path for all templates
- * @param $langInstance An instance of LanguageSystem (default)
- * @param $ioInstance An instance of FileIOHandler (default, middleware!)
+ * @param $basePath The local base path for all templates
+ * @param $langInstance An instance of LanguageSystem (default)
+ * @param $ioInstance An instance of FileIOHandler (default, middleware!)
* @return $tplInstance An instance of TemplateEngine
* @throws BasePathIsEmptyException If the provided $basePath is empty
* @throws InvalidBasePathStringException If $basePath is no string
* @throws BasePathIsNoDirectoryException If $basePath is no
- * directory or not found
+ * directory or not found
* @throws BasePathReadProtectedException If $basePath is
- * read-protected
+ * read-protected
*/
public final static function createTemplateEngine ($basePath, ManageableLanguage $langInstance, FileIOHandler $ioInstance) {
// Get a new instance
/**
* Extract variables from a given raw data stream
*
- * @param $rawData The raw template data we shall analyze
+ * @param $rawData The raw template data we shall analyze
* @return void
* @throws InvalidTemplateVariableNameException If a variable name
- * in a template is
- * invalid
+ * in a template is
+ * invalid
*/
private function extractVariablesFromRawData ($rawData) {
// Cast to string
$this->assignVariable($var, $varMatches[3][$key]);
} else {
// Non-string found so we need some deeper analysis...
+ // @TODO Unfinished work or don't die here.
die("Deeper analysis not yet implemented!");
}
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Komprimierungshandler");
+ $this->setObjectDescription("Komprimierungshandler");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Datenbank-Mittelschicht");
+ $this->setObjectDescription("Datenbank-Mittelschicht");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Debug-Ausgabe-Handler");
+ $this->setObjectDescription("Debug-Ausgabe-Handler");
// Create an unique ID
$this->createUniqueID();
parent::constructor(__CLASS__);
// Set description
- $this->setPartDescr("Datei-Ein-/Ausgabe-Handler");
+ $this->setObjectDescription("Datei-Ein-/Ausgabe-Handler");
// Create an unique ID
$this->createUniqueID();
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+// Get the configuration instance
+$cfg = FrameworkConfiguration::getInstance();
+
// CFG: DEFAULT-APPLICATION
$cfg->setConfigEntry("default_application", "mxchange");
// Set new prefix (temporary!)
$this->prefix = "config-";
+ $this->preLen = strlen($this->prefix);
// Set base directory
- $basePath = sprintf("%s/inc/config/", PATH);
+ $basePath = sprintf("%sinc/config/", PATH);
// Load all classes from the config directory
$this->loadClasses($basePath);
// Set the prefix back
$this->prefix = $oldPrefix;
+ $this->preLen = strlen($this->prefix);
}
}
$configAppIncludes = array(
sprintf("class_%s", FrameworkConfiguration::getInstance()->readConfig("app_helper_class")), // The ApplicationHelper class
"config", // The application's own configuration
- "init", // The application initializer
- "loader", // The application's class loader
+ "init", // The application initializer
+ "loader", // The application's class loader
"debug", // Some debugging stuff
"exceptions", // The application's own exception handler
- "starter", // The application starter (calls entryPoint(), etc.)
+ "starter", // The application starter (calls entryPoint(), etc.)
);
// Load them all (try only)
{?header:title="Problem in application framework detected!"?}
-{?navigation:nav_row=home;imprint;contact?}
+{?navigation?}
- <div class="emergency_exit message_box">
+ <div id="emergency_exit message_box">
$content[message]
</div>
- <div class="footer_message message_box">
+ <div id="footer_message message_box">
$content[footer_msg]
</div>
</head>
<body>
-<div class="masterbox">
+<div id="masterbox">