From: Roland Haeder Date: Tue, 25 Aug 2015 16:48:48 +0000 (+0200) Subject: Updated 'core' + renamed 'main' -> 'classes'. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8f8b11652eff9bd83ac739ab2616811594630eff;p=install.git Updated 'core' + renamed 'main' -> 'classes'. Signed-off-by: Roland Haeder --- diff --git a/application/install/classes/.htaccess b/application/install/classes/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/actions/.htaccess b/application/install/classes/actions/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/actions/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/actions/class_ b/application/install/classes/actions/class_ new file mode 100644 index 0000000..895be1b --- /dev/null +++ b/application/install/classes/actions/class_ @@ -0,0 +1,82 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . + */ +class ???Action extends BaseBlogAction implements Commandable, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this action + * + * @param $resolverInstance An instance of an action resolver + * @return $actionInstance An instance of this action class + */ + public final static function create???Action (ActionResolver $resolverInstance) { + // Get a new instance + $actionInstance = new ???Action(); + + // Return the instance + return $actionInstance; + } + + /** + * Executes the command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Call parent execute method + parent::execute($requestInstance, $responseInstance); + + // Add your code here + $this->partialStub("You have to implement me."); + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo Add some filters here + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Call parent addExtraFilters method + parent::addExtraFilters($controllerInstance, $requestInstance); + + // Unfinished method + } +} + +// [EOF] +?> diff --git a/application/install/classes/actions/class_BaseInstallAction.php b/application/install/classes/actions/class_BaseInstallAction.php new file mode 100644 index 0000000..e3d5c6c --- /dev/null +++ b/application/install/classes/actions/class_BaseInstallAction.php @@ -0,0 +1,63 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.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 . + */ +class BaseInstallAction extends BaseAction { + /** + * Protected constructor + * + * @param $className Name of the class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + } + + /** + * Executes the command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Add code here executed with every action + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo Add some filters here + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Fetch some install data + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('install_data_filter', array($controllerInstance))); + } +} + +// [EOF] +?> diff --git a/application/install/classes/actions/web/.htaccess b/application/install/classes/actions/web/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/actions/web/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/class_ b/application/install/classes/class_ new file mode 100644 index 0000000..7a0d8b6 --- /dev/null +++ b/application/install/classes/class_ @@ -0,0 +1,37 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . + */ +class extends BaseFrameworkSystem { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } +} + +// [EOF] +?> diff --git a/application/install/classes/commands/.htaccess b/application/install/classes/commands/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/commands/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/commands/web/.htaccess b/application/install/classes/commands/web/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/commands/web/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/commands/web/failed/.htaccess b/application/install/classes/commands/web/failed/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/commands/web/failed/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/commands/web/failed/class_WebInstallFailedCommand.php b/application/install/classes/commands/web/failed/class_WebInstallFailedCommand.php new file mode 100644 index 0000000..4e97541 --- /dev/null +++ b/application/install/classes/commands/web/failed/class_WebInstallFailedCommand.php @@ -0,0 +1,77 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.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 . + */ +class WebInstallFailedCommand extends BaseCommand implements Commandable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $commandInstance An instance a prepared command class + */ + public static final function createWebInstallFailedCommand (CommandResolver $resolverInstance) { + // Get new instance + $commandInstance = new WebInstallFailedCommand(); + + // Set the application instance + $commandInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $commandInstance; + } + + /** + * Executes the given command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + $this->partialStub("Unfinished method."); + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Empty for now + } +} + +// [EOF] +?> diff --git a/application/install/classes/controller/.htaccess b/application/install/classes/controller/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/controller/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/controller/web/.htaccess b/application/install/classes/controller/web/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/controller/web/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/controller/web/class_WebInstallFailedController.php b/application/install/classes/controller/web/class_WebInstallFailedController.php new file mode 100644 index 0000000..18f1b66 --- /dev/null +++ b/application/install/classes/controller/web/class_WebInstallFailedController.php @@ -0,0 +1,106 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.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 . + */ +class WebInstallFailedController extends BaseController implements Controller { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $controllerInstance A prepared instance of this class + * @todo Add some filters to this controller + */ + public static final function createWebInstallFailedController (CommandResolver $resolverInstance) { + // Create the instance + $controllerInstance = new WebInstallFailedController(); + + // Set the command resolver + $controllerInstance->setResolverInstance($resolverInstance); + + // User auth filter + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance))); + + // User update filter + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter', array($controllerInstance))); + + // News fetcher filter + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter', array($controllerInstance))); + + // News proccess/display-preparation + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter', array($controllerInstance))); + + // Return the prepared instance + return $controllerInstance; + } + + /** + * Handles the given request and response + * + * @param $requestInstance An instance of a request class + * @param $responseInstance An instance of a response class + * @return void + */ + public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance); + + // Add more filters by the command + $commandInstance->addExtraFilters($this, $requestInstance); + + // Try to run the pre filters, if auth exceptions come through redirect here + try { + // Run the pre filters + $this->executePreFilters($requestInstance, $responseInstance); + } catch (UserAuthorizationException $e) { + // Redirect to main page + $responseInstance->redirectToConfiguredUrl('login_failed_url'); + + // Exit here + exit(); + } + + // This request was valid! :-D + $requestInstance->requestIsValid(); + + // Execute the command + $commandInstance->execute($requestInstance, $responseInstance); + + // Run the pre filters + $this->executePostFilters($requestInstance, $responseInstance); + + // Flush the response out + $responseInstance->flushBuffer(); + } +} + +// [EOF] +?> diff --git a/application/install/classes/filter/.htaccess b/application/install/classes/filter/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/filter/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/filter/class_ b/application/install/classes/filter/class_ new file mode 100644 index 0000000..71bc26a --- /dev/null +++ b/application/install/classes/filter/class_ @@ -0,0 +1,69 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . + */ +class ???Filter extends BaseBlogFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @param $controllerInstance An instance of a Controller class + * @return $filterInstance An instance of this filter class + */ + public final static function create???Filter (Controller $controllerInstance) { + // Get a new instance + $filterInstance = new ???Filter(); + + // Set the controller + $filterInstance->setControllerInstance($controllerInstance); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo Add code being executed in this filter + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Execute the parent execute method + parent::execute($requestInstance, $responseInstance); + + $this->partialStub("Add code here for your specific filter."); + } +} + +// [EOF] +?> diff --git a/application/install/classes/filter/class_BaseInstallFilter.php b/application/install/classes/filter/class_BaseInstallFilter.php new file mode 100644 index 0000000..77ae772 --- /dev/null +++ b/application/install/classes/filter/class_BaseInstallFilter.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.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 . + */ +class BaseInstallFilter extends BaseFilter { + /** + * Protected constructor + * + * @param $className Name of the filter class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Add something to do on every filter + } +} + +// [EOF] +?> diff --git a/application/install/classes/filter/install/.htaccess b/application/install/classes/filter/install/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/filter/install/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/menu/.htaccess b/application/install/classes/menu/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/install/classes/menu/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/install/classes/menu/class_Install b/application/install/classes/menu/class_Install new file mode 100644 index 0000000..2295888 --- /dev/null +++ b/application/install/classes/menu/class_Install @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . + */ +class Install???Menu extends BaseMenu implements RenderableMenu { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $menuInstance An instance of this class + */ + public final static function createInstall???Menu () { + // Get a new instance + $menuInstance = new Install???Menu(); + + // Return the prepared instance + return $menuInstance; + } +} + +// [EOF] +?> diff --git a/application/install/classes/menu/class_InstallHomeMenu.php b/application/install/classes/menu/class_InstallHomeMenu.php new file mode 100644 index 0000000..4580eac --- /dev/null +++ b/application/install/classes/menu/class_InstallHomeMenu.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.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 . + */ +class InstallHomeMenu extends BaseMenu implements RenderableMenu { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $menuInstance An instance of this class + */ + public static final function createInstallHomeMenu () { + // Get a new instance + $menuInstance = new InstallHomeMenu(); + + // Return the prepared instance + return $menuInstance; + } +} + +// [EOF] +?> diff --git a/application/install/main/.htaccess b/application/install/main/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/actions/.htaccess b/application/install/main/actions/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/actions/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/actions/class_ b/application/install/main/actions/class_ deleted file mode 100644 index 895be1b..0000000 --- a/application/install/main/actions/class_ +++ /dev/null @@ -1,82 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . - */ -class ???Action extends BaseBlogAction implements Commandable, Registerable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this action - * - * @param $resolverInstance An instance of an action resolver - * @return $actionInstance An instance of this action class - */ - public final static function create???Action (ActionResolver $resolverInstance) { - // Get a new instance - $actionInstance = new ???Action(); - - // Return the instance - return $actionInstance; - } - - /** - * Executes the command with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @todo 0% done - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Call parent execute method - parent::execute($requestInstance, $responseInstance); - - // Add your code here - $this->partialStub("You have to implement me."); - } - - /** - * Adds extra filters to the given controller instance - * - * @param $controllerInstance A controller instance - * @param $requestInstance An instance of a class with an Requestable interface - * @return void - * @todo Add some filters here - */ - public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { - // Call parent addExtraFilters method - parent::addExtraFilters($controllerInstance, $requestInstance); - - // Unfinished method - } -} - -// [EOF] -?> diff --git a/application/install/main/actions/class_BaseInstallAction.php b/application/install/main/actions/class_BaseInstallAction.php deleted file mode 100644 index e3d5c6c..0000000 --- a/application/install/main/actions/class_BaseInstallAction.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class BaseInstallAction extends BaseAction { - /** - * Protected constructor - * - * @param $className Name of the class - * @return void - */ - protected function __construct ($className) { - // Call parent constructor - parent::__construct($className); - } - - /** - * Executes the command with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @todo 0% done - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Add code here executed with every action - } - - /** - * Adds extra filters to the given controller instance - * - * @param $controllerInstance A controller instance - * @param $requestInstance An instance of a class with an Requestable interface - * @return void - * @todo Add some filters here - */ - public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { - // Fetch some install data - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('install_data_filter', array($controllerInstance))); - } -} - -// [EOF] -?> diff --git a/application/install/main/actions/web/.htaccess b/application/install/main/actions/web/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/actions/web/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/class_ b/application/install/main/class_ deleted file mode 100644 index 7a0d8b6..0000000 --- a/application/install/main/class_ +++ /dev/null @@ -1,37 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . - */ -class extends BaseFrameworkSystem { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } -} - -// [EOF] -?> diff --git a/application/install/main/commands/.htaccess b/application/install/main/commands/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/commands/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/commands/web/.htaccess b/application/install/main/commands/web/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/commands/web/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/commands/web/failed/.htaccess b/application/install/main/commands/web/failed/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/commands/web/failed/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/commands/web/failed/class_WebInstallFailedCommand.php b/application/install/main/commands/web/failed/class_WebInstallFailedCommand.php deleted file mode 100644 index 4e97541..0000000 --- a/application/install/main/commands/web/failed/class_WebInstallFailedCommand.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class WebInstallFailedCommand extends BaseCommand implements Commandable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @param $resolverInstance An instance of a command resolver class - * @return $commandInstance An instance a prepared command class - */ - public static final function createWebInstallFailedCommand (CommandResolver $resolverInstance) { - // Get new instance - $commandInstance = new WebInstallFailedCommand(); - - // Set the application instance - $commandInstance->setResolverInstance($resolverInstance); - - // Return the prepared instance - return $commandInstance; - } - - /** - * Executes the given command with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @todo 0% done - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - $this->partialStub("Unfinished method."); - } - - /** - * Adds extra filters to the given controller instance - * - * @param $controllerInstance A controller instance - * @param $requestInstance An instance of a class with an Requestable interface - * @return void - */ - public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { - // Empty for now - } -} - -// [EOF] -?> diff --git a/application/install/main/controller/.htaccess b/application/install/main/controller/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/controller/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/controller/web/.htaccess b/application/install/main/controller/web/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/controller/web/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/controller/web/class_WebInstallFailedController.php b/application/install/main/controller/web/class_WebInstallFailedController.php deleted file mode 100644 index 18f1b66..0000000 --- a/application/install/main/controller/web/class_WebInstallFailedController.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class WebInstallFailedController extends BaseController implements Controller { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @param $resolverInstance An instance of a command resolver class - * @return $controllerInstance A prepared instance of this class - * @todo Add some filters to this controller - */ - public static final function createWebInstallFailedController (CommandResolver $resolverInstance) { - // Create the instance - $controllerInstance = new WebInstallFailedController(); - - // Set the command resolver - $controllerInstance->setResolverInstance($resolverInstance); - - // User auth filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance))); - - // User update filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter', array($controllerInstance))); - - // News fetcher filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter', array($controllerInstance))); - - // News proccess/display-preparation - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter', array($controllerInstance))); - - // Return the prepared instance - return $controllerInstance; - } - - /** - * Handles the given request and response - * - * @param $requestInstance An instance of a request class - * @param $responseInstance An instance of a response class - * @return void - */ - public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { - // Get the command instance from the resolver by sending a request instance to the resolver - $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance); - - // Add more filters by the command - $commandInstance->addExtraFilters($this, $requestInstance); - - // Try to run the pre filters, if auth exceptions come through redirect here - try { - // Run the pre filters - $this->executePreFilters($requestInstance, $responseInstance); - } catch (UserAuthorizationException $e) { - // Redirect to main page - $responseInstance->redirectToConfiguredUrl('login_failed_url'); - - // Exit here - exit(); - } - - // This request was valid! :-D - $requestInstance->requestIsValid(); - - // Execute the command - $commandInstance->execute($requestInstance, $responseInstance); - - // Run the pre filters - $this->executePostFilters($requestInstance, $responseInstance); - - // Flush the response out - $responseInstance->flushBuffer(); - } -} - -// [EOF] -?> diff --git a/application/install/main/filter/.htaccess b/application/install/main/filter/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/filter/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/filter/class_ b/application/install/main/filter/class_ deleted file mode 100644 index 71bc26a..0000000 --- a/application/install/main/filter/class_ +++ /dev/null @@ -1,69 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . - */ -class ???Filter extends BaseBlogFilter implements Filterable { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this filter class - * - * @param $controllerInstance An instance of a Controller class - * @return $filterInstance An instance of this filter class - */ - public final static function create???Filter (Controller $controllerInstance) { - // Get a new instance - $filterInstance = new ???Filter(); - - // Set the controller - $filterInstance->setControllerInstance($controllerInstance); - - // Return the instance - return $filterInstance; - } - - /** - * Executes the filter with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @todo Add code being executed in this filter - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Execute the parent execute method - parent::execute($requestInstance, $responseInstance); - - $this->partialStub("Add code here for your specific filter."); - } -} - -// [EOF] -?> diff --git a/application/install/main/filter/class_BaseInstallFilter.php b/application/install/main/filter/class_BaseInstallFilter.php deleted file mode 100644 index 77ae772..0000000 --- a/application/install/main/filter/class_BaseInstallFilter.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class BaseInstallFilter extends BaseFilter { - /** - * Protected constructor - * - * @param $className Name of the filter class - * @return void - */ - protected function __construct ($className) { - // Call parent constructor - parent::__construct($className); - } - - /** - * Executes the filter with given request and response objects - * - * @param $requestInstance An instance of a class with an Requestable interface - * @param $responseInstance An instance of a class with an Responseable interface - * @return void - * @todo 0% - */ - public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Add something to do on every filter - } -} - -// [EOF] -?> diff --git a/application/install/main/filter/install/.htaccess b/application/install/main/filter/install/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/filter/install/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/menu/.htaccess b/application/install/main/menu/.htaccess deleted file mode 100644 index 3a42882..0000000 --- a/application/install/main/menu/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/install/main/menu/class_Install b/application/install/main/menu/class_Install deleted file mode 100644 index 2295888..0000000 --- a/application/install/main/menu/class_Install +++ /dev/null @@ -1,50 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard 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 . - */ -class Install???Menu extends BaseMenu implements RenderableMenu { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @return $menuInstance An instance of this class - */ - public final static function createInstall???Menu () { - // Get a new instance - $menuInstance = new Install???Menu(); - - // Return the prepared instance - return $menuInstance; - } -} - -// [EOF] -?> diff --git a/application/install/main/menu/class_InstallHomeMenu.php b/application/install/main/menu/class_InstallHomeMenu.php deleted file mode 100644 index 4580eac..0000000 --- a/application/install/main/menu/class_InstallHomeMenu.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Installation-Wizard Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.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 . - */ -class InstallHomeMenu extends BaseMenu implements RenderableMenu { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this class - * - * @return $menuInstance An instance of this class - */ - public static final function createInstallHomeMenu () { - // Get a new instance - $menuInstance = new InstallHomeMenu(); - - // Return the prepared instance - return $menuInstance; - } -} - -// [EOF] -?> diff --git a/core b/core index 867042e..7bc4014 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 867042ee4793d38bd778717192f4f6cd727b8e19 +Subproject commit 7bc4014657a70dedfc38b9b28d134aa7c3a6158c