X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fselector%2Fclass_ApplicationSelector.php;h=03e03ef1dc96e973479da6fced3aa35aacd92df4;hb=11c0ba60cb6c044928f41e93cc98d214b1d8ad7c;hp=a7f3294d1f8458615fea5befad9c3cc703cf1ed7;hpb=1d128d8532290e84885d09d2d3f0060abd08e49e;p=shipsimu.git diff --git a/application/selector/class_ApplicationSelector.php b/application/selector/class_ApplicationSelector.php index a7f3294..03e03ef 100644 --- a/application/selector/class_ApplicationSelector.php +++ b/application/selector/class_ApplicationSelector.php @@ -80,7 +80,7 @@ class ApplicationSelector extends BaseFrameworkSystem { * @param $fileIOInstance The file I/O instance * @return $selInstance An instance of ApplicationSelector */ - public final static function createApplicationSelector (ManageableLanguage $langInstance, FileIOHandler $fileIOInstance) { + public final static function createApplicationSelector (ManageableLanguage $langInstance, FileIoHandler $fileIOInstance) { // Get a new instance $selInstance = new ApplicationSelector(); @@ -89,7 +89,7 @@ class ApplicationSelector extends BaseFrameworkSystem { // Set language and file I/O instances $selInstance->setLanguageInstance($langInstance); - $selInstance->setFileIOInstance($fileIOInstance); + $selInstance->setFileIoInstance($fileIOInstance); // Return the prepared instance return $selInstance; @@ -141,9 +141,9 @@ class ApplicationSelector extends BaseFrameworkSystem { } elseif (!is_object($app)) { // Not an object throw new NoObjectException($app, self::EXCEPTION_IS_NO_OBJECT); - } elseif (!method_exists($app, $this->getConfigInstance()->readConfig("entry_method"))) { + } elseif (!method_exists($app, $this->getConfigInstance()->readConfig('entry_method'))) { // Method not found! - throw new MissingMethodException(array($app, $this->getConfigInstance()->readConfig("entry_method")), self::EXCEPTION_MISSING_METHOD); + throw new MissingMethodException(array($app, $this->getConfigInstance()->readConfig('entry_method')), self::EXCEPTION_MISSING_METHOD); } // Add the current instance to the list @@ -186,7 +186,7 @@ class ApplicationSelector extends BaseFrameworkSystem { * @return $shortName This selector's short name */ public function getAppShortName() { - $shortName = $this->getConfigInstance()->readConfig("selector_path"); + $shortName = $this->getConfigInstance()->readConfig('selector_path'); return $shortName; } @@ -212,11 +212,11 @@ class ApplicationSelector extends BaseFrameworkSystem { // Generate the base path for all applications $appBasePath = sprintf("%s%s/", PATH, - $this->getConfigInstance()->readConfig("application_path") + $this->getConfigInstance()->readConfig('application_path') ); // Add the selector path to the ignore list - $this->addDirIgnoreList($this->getConfigInstance()->readConfig("selector_path")); + $this->addDirIgnoreList($this->getConfigInstance()->readConfig('selector_path')); // Get a directory pointer for the application path $dirInstance = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($appBasePath); @@ -233,7 +233,7 @@ class ApplicationSelector extends BaseFrameworkSystem { // Is this a readable directory? (files will be ignored silently) if ((is_dir($fqfn)) && (is_readable($fqfn))) { // Then get the init.php script for analyzing - $initScript = sprintf("%s/init%s", $fqfn, $this->getConfigInstance()->readConfig("php_extension")); + $initScript = sprintf("%s/init%s", $fqfn, $this->getConfigInstance()->readConfig('php_extension')); // Load the application's init.php script and append the // application to the ArrayObject @@ -266,7 +266,7 @@ class ApplicationSelector extends BaseFrameworkSystem { // Try to load the web template $tplEngine->loadWebTemplate(sprintf("%s_%s", - $this->getConfigInstance()->readConfig("tpl_selector_prefix"), + $this->getConfigInstance()->readConfig('tpl_selector_prefix'), strtolower($appInstance->getAppShortName()) )); @@ -301,7 +301,7 @@ class ApplicationSelector extends BaseFrameworkSystem { $tplEngine = $this->prepareTemplateEngine($this); // Load the selector's template - $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig("selector_main_tpl")); + $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_main_tpl')); // Now store it in the class $this->setSelectorTemplateEngine($tplEngine); @@ -323,7 +323,7 @@ class ApplicationSelector extends BaseFrameworkSystem { $tplEngine = $this->prepareTemplateEngine($this); // Load template which shall later hold all application templates - $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig("selector_apps_tpl")); + $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_apps_tpl')); // Add all loaded application templates together $dummy = ""; @@ -349,16 +349,6 @@ class ApplicationSelector extends BaseFrameworkSystem { } // END - for } - - /** - * Stub! - */ - public function saveObjectToDatabase () { - $this->getDebugInstance()->output(sprintf("[%s:] Stub %s erreicht.", - $this->__toString(), - __FUNCTION__ - )); - } } // [EOF]