From 8a14c547a7c7ef07bc3d67778aa4008fa17d703f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 26 Feb 2017 22:05:14 +0100 Subject: [PATCH] Continued: - added "import" of BaseStacker and Stackable - added "import" of BaseMailer and DeliverableMail - added missing namespace in config entries - killed more [EOF] and discouraged ?> MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/file_stack/format.txt | 3 +- framework/config.php | 2 +- framework/main/classes/actions/class_ | 4 +- framework/main/classes/class_ | 4 +- framework/main/classes/class_Base | 4 +- .../classes/class_BaseFrameworkSystem.php | 1 + framework/main/classes/client/class_ | 4 +- framework/main/classes/commands/class_ | 4 +- .../classes/commands/console/class_Console | 4 +- .../main/classes/commands/html/class_Html | 4 +- framework/main/classes/container/class_ | 4 +- framework/main/classes/controller/class_ | 4 +- .../main/classes/controller/html/class_Html | 4 +- framework/main/classes/database/class_ | 4 +- framework/main/classes/discovery/class_ | 4 +- framework/main/classes/factories/class_ | 4 +- framework/main/classes/feature/class_ | 4 +- framework/main/classes/filesystem/class_ | 4 +- framework/main/classes/filter/class_ | 4 +- framework/main/classes/handler/class_ | 4 +- .../main/classes/handler/raw_data/class_ | 4 +- .../classes/handler/raw_data/network/class_ | 4 +- framework/main/classes/helper/captcha/class_ | 4 +- framework/main/classes/helper/class_ | 4 +- framework/main/classes/helper/html/class_ | 4 +- framework/main/classes/images/class_ | 4 +- framework/main/classes/index/class_ | 4 +- framework/main/classes/iterator/class_ | 4 +- framework/main/classes/listener/class_ | 4 +- framework/main/classes/lists/class_ | 4 +- framework/main/classes/mailer/class_ | 13 +- .../mailer/debug/class_DebugMailer.php | 2 + framework/main/classes/output/class_ | 4 +- framework/main/classes/parser/class_ | 4 +- framework/main/classes/registry/class_ | 4 +- framework/main/classes/request/class_ | 4 +- framework/main/classes/resolver/class_ | 435 ------------------ .../classes/resolver/command/html/class_Html | 4 +- framework/main/classes/stacker/class_ | 11 +- .../stacker/fifo/class_FiFoStacker.php | 4 + framework/main/classes/stacker/file/class_ | 6 +- .../stacker/file/fifo/class_FiFoFileStack.php | 2 +- .../stacker/filo/class_FiLoStacker.php | 4 + framework/main/classes/states/class_ | 4 +- framework/main/classes/streams/class_ | 4 +- framework/main/classes/streams/input/class_ | 4 +- framework/main/classes/streams/output/class_ | 4 +- framework/main/classes/tasks/class_ | 4 +- framework/main/classes/template/class_ | 4 +- .../mail/class_MailTemplateEngine.php | 1 + framework/main/classes/visitor/class_ | 4 +- framework/main/exceptions/class_ | 4 +- framework/main/exceptions/database/class_ | 4 +- .../main/interfaces/index/class_Indexable | 4 +- .../interfaces/stacker/class_Stackable.php | 2 +- .../stacker/file/class_StackableFile.php | 3 + 56 files changed, 81 insertions(+), 576 deletions(-) diff --git a/contrib/file_stack/format.txt b/contrib/file_stack/format.txt index 336428db..058b5b87 100644 --- a/contrib/file_stack/format.txt +++ b/contrib/file_stack/format.txt @@ -1,7 +1,8 @@ A file-based stack: =================== -This is the format for a file-based stack which works as any Stackable class. +This is the format for a file-based stack which works as any other Stackable +class. General made up: diff --git a/framework/config.php b/framework/config.php index 5de88af9..2d9cd8e7 100644 --- a/framework/config.php +++ b/framework/config.php @@ -263,7 +263,7 @@ $cfg->setConfigEntry('image_cmd_resolver_class', 'ImageCommandResolver'); $cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'ImageCommandResolver'); // CFG: MAILER-CLASS -$cfg->setConfigEntry('mailer_class', 'DebugMailer'); +$cfg->setConfigEntry('mailer_class', 'CoreFramework\Mailer\Debug\DebugMailer'); // CFG: XML-PARSER-CLASS $cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser'); diff --git a/framework/main/classes/actions/class_ b/framework/main/classes/actions/class_ index 99f59291..e332ddfb 100644 --- a/framework/main/classes/actions/class_ +++ b/framework/main/classes/actions/class_ @@ -62,7 +62,5 @@ class ???Action extends BaseAction implements Commandable { public function execute (Requestable $requestInstance, Responseable $responseInstance) { $this->partialStub("You have to implement me."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/class_ b/framework/main/classes/class_ index c9c4aa8f..a6c0d3ba 100644 --- a/framework/main/classes/class_ +++ b/framework/main/classes/class_ @@ -45,7 +45,5 @@ class ???!!! extends Base!!! implements CompileableTemplate { // Return the prepared instance return $///Instance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/class_Base b/framework/main/classes/class_Base index 9cd9fd74..61084df0 100644 --- a/framework/main/classes/class_Base +++ b/framework/main/classes/class_Base @@ -32,7 +32,5 @@ class Base??? extends BaseFrameworkSystem { // Call parent constructor parent::__construct($className); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 3de9284b..b15d4362 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -33,6 +33,7 @@ use CoreFramework\Resolver\Resolver; use CoreFramework\Result\Database\CachedDatabaseResult; use CoreFramework\Result\Search\SearchableResult; use CoreFramework\Response\Responseable; +use CoreFramework\Stacker\Stackable; use CoreFramework\Stream\Output\OutputStreamer; use CoreFramework\Template\CompileableTemplate; use CoreFramework\User\ManageableAccount; diff --git a/framework/main/classes/client/class_ b/framework/main/classes/client/class_ index 753552f8..363cc00a 100644 --- a/framework/main/classes/client/class_ +++ b/framework/main/classes/client/class_ @@ -44,7 +44,5 @@ class ???Client extends BaseClient implements Client { // Return the prepared instance return $clientInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/commands/class_ b/framework/main/classes/commands/class_ index d1709aac..40181f41 100644 --- a/framework/main/classes/commands/class_ +++ b/framework/main/classes/commands/class_ @@ -70,7 +70,5 @@ class ???Command extends BaseCommand implements Commandable { public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { $this->partialStub('Unfinished!'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/commands/console/class_Console b/framework/main/classes/commands/console/class_Console index 756617a4..55ca37ce 100644 --- a/framework/main/classes/commands/console/class_Console +++ b/framework/main/classes/commands/console/class_Console @@ -70,7 +70,5 @@ class Console???Command extends BaseCommand implements Commandable { public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { $this->partialStub('Unfinished!'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/commands/html/class_Html b/framework/main/classes/commands/html/class_Html index 8f51ed5b..917c94cf 100644 --- a/framework/main/classes/commands/html/class_Html +++ b/framework/main/classes/commands/html/class_Html @@ -71,7 +71,5 @@ class Html???Command extends BaseCommand implements Commandable { public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Empty for now } -} -// [EOF] -?> +} diff --git a/framework/main/classes/container/class_ b/framework/main/classes/container/class_ index 721ef741..32906f15 100644 --- a/framework/main/classes/container/class_ +++ b/framework/main/classes/container/class_ @@ -44,7 +44,5 @@ class ???Container extends BaseContainer implements Registerable { // Return the prepared instance return $containerInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/controller/class_ b/framework/main/classes/controller/class_ index 907d1fbf..79c7a596 100644 --- a/framework/main/classes/controller/class_ +++ b/framework/main/classes/controller/class_ @@ -69,7 +69,5 @@ class ???Controller extends BaseController implements Controller { // Flush the response out $responseInstance->flushBuffer(); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/controller/html/class_Html b/framework/main/classes/controller/html/class_Html index 8b1a06e0..8057f3be 100644 --- a/framework/main/classes/controller/html/class_Html +++ b/framework/main/classes/controller/html/class_Html @@ -64,7 +64,5 @@ class Html???Controller extends BaseController implements Controller { // Generic pre-post command execution $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/database/class_ b/framework/main/classes/database/class_ index ba818289..1e6e7a3e 100644 --- a/framework/main/classes/database/class_ +++ b/framework/main/classes/database/class_ @@ -32,7 +32,5 @@ class extends BaseDatabaseBackend implements DatabaseBackendInterface { // Call parent constructor parent::__construct($class); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/discovery/class_ b/framework/main/classes/discovery/class_ index 8d628708..b45ea1cf 100644 --- a/framework/main/classes/discovery/class_ +++ b/framework/main/classes/discovery/class_ @@ -66,7 +66,5 @@ class ???Discovery extends BaseDiscovery implements Discoverable { public function addResultsToHelper (HelpableTemplate $helperInstance) { $this->partialStub("Please implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/factories/class_ b/framework/main/classes/factories/class_ index 91d69ae3..9c9ab026 100644 --- a/framework/main/classes/factories/class_ +++ b/framework/main/classes/factories/class_ @@ -31,7 +31,5 @@ class ???Factory extends BaseFactory { // Call parent constructor parent::__construct(__CLASS__); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/feature/class_ b/framework/main/classes/feature/class_ index 3ee888ee..89d86886 100644 --- a/framework/main/classes/feature/class_ +++ b/framework/main/classes/feature/class_ @@ -61,7 +61,5 @@ class ???Feature extends BaseFeature implements Feature { // Return status return $isAvailable; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/filesystem/class_ b/framework/main/classes/filesystem/class_ index bb10dcab..2d5ea467 100644 --- a/framework/main/classes/filesystem/class_ +++ b/framework/main/classes/filesystem/class_ @@ -45,7 +45,5 @@ class ???Filesystem extends BaseFilesystem implements Filesystem { // Return the prepared instance return $///Instance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/filter/class_ b/framework/main/classes/filter/class_ index e689a3c8..e94d8e72 100644 --- a/framework/main/classes/filter/class_ +++ b/framework/main/classes/filter/class_ @@ -58,7 +58,5 @@ class ???Filter extends BaseFilter implements Filterable { // Implement this! $this->partialStub("Please implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/handler/class_ b/framework/main/classes/handler/class_ index afe1678a..d92f868a 100644 --- a/framework/main/classes/handler/class_ +++ b/framework/main/classes/handler/class_ @@ -47,7 +47,5 @@ class ???Handler extends BaseHandler implements Handleable___ { // Return the prepared instance return $handlerInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/handler/raw_data/class_ b/framework/main/classes/handler/raw_data/class_ index 965f048a..8151a661 100644 --- a/framework/main/classes/handler/raw_data/class_ +++ b/framework/main/classes/handler/raw_data/class_ @@ -67,7 +67,5 @@ class ???NetworkPackageHandler extends BaseNetworkPackageHandler implements Netw // Implement processing here $this->partialStub('Please implement this method.'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/handler/raw_data/network/class_ b/framework/main/classes/handler/raw_data/network/class_ index b452a2ba..09dbcf3b 100644 --- a/framework/main/classes/handler/raw_data/network/class_ +++ b/framework/main/classes/handler/raw_data/network/class_ @@ -62,7 +62,5 @@ class ???RawDataHandler extends BaseRawDataHandler implements Networkable { */ public function processRawDataFromResource (array $socketArray) { } -} -// [EOF] -?> +} diff --git a/framework/main/classes/helper/captcha/class_ b/framework/main/classes/helper/captcha/class_ index ccc429ce..0936f491 100644 --- a/framework/main/classes/helper/captcha/class_ +++ b/framework/main/classes/helper/captcha/class_ @@ -72,7 +72,5 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha { public function renderCode () { $this->partialStub("Please implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/helper/class_ b/framework/main/classes/helper/class_ index d1d3fff0..dd3b11b4 100644 --- a/framework/main/classes/helper/class_ +++ b/framework/main/classes/helper/class_ @@ -44,7 +44,5 @@ class ???Helper extends BaseHelper { // Return the prepared instance return $helperInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/helper/html/class_ b/framework/main/classes/helper/html/class_ index 5d9beab7..4a75bc47 100644 --- a/framework/main/classes/helper/html/class_ +++ b/framework/main/classes/helper/html/class_ @@ -70,7 +70,5 @@ class Html???Helper extends BaseHtmlHelper implements HelpableTemplate { public function flushContent () { $this->partialStub("Please implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/images/class_ b/framework/main/classes/images/class_ index 0abd9201..2197725e 100644 --- a/framework/main/classes/images/class_ +++ b/framework/main/classes/images/class_ @@ -47,7 +47,5 @@ class ???Image extends BaseImage { // Return the instance return $imageInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/index/class_ b/framework/main/classes/index/class_ index 42c4773b..b74ed32a 100644 --- a/framework/main/classes/index/class_ +++ b/framework/main/classes/index/class_ @@ -48,7 +48,5 @@ class ???Index extends BaseIndex implements Indexable, Registerable { // Return the prepared instance return $indexInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/iterator/class_ b/framework/main/classes/iterator/class_ index 24351fb9..5fc5dc53 100644 --- a/framework/main/classes/iterator/class_ +++ b/framework/main/classes/iterator/class_ @@ -101,7 +101,5 @@ class ???Iterator extends BaseIterator implements Iterator { public function valid () { $this->partialStub('Please implement this method.'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/listener/class_ b/framework/main/classes/listener/class_ index d98b8e39..29b9f5c9 100644 --- a/framework/main/classes/listener/class_ +++ b/framework/main/classes/listener/class_ @@ -102,7 +102,5 @@ class ???Listener extends BaseListener implements Listenable { public function getConnectionType () { $this->partialStub('Need to implement this method.') { } -} -// [EOF] -?> +} diff --git a/framework/main/classes/lists/class_ b/framework/main/classes/lists/class_ index b650e330..a6dfa935 100644 --- a/framework/main/classes/lists/class_ +++ b/framework/main/classes/lists/class_ @@ -64,7 +64,5 @@ class ???List extends BaseList implements Listable { public function clearList () { $this->partialStub('Please implement this method.'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/mailer/class_ b/framework/main/classes/mailer/class_ index bb679b22..522f43b0 100644 --- a/framework/main/classes/mailer/class_ +++ b/framework/main/classes/mailer/class_ @@ -1,6 +1,13 @@ * @version 0.0.0 @@ -64,7 +71,5 @@ class ???Mailer extends BaseMailer implements DeliverableMail { public function sendAdminNotification() { $this->partialStub("You have to implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/mailer/debug/class_DebugMailer.php b/framework/main/classes/mailer/debug/class_DebugMailer.php index 93c4a1f4..b7781ca7 100644 --- a/framework/main/classes/mailer/debug/class_DebugMailer.php +++ b/framework/main/classes/mailer/debug/class_DebugMailer.php @@ -4,6 +4,8 @@ namespace CoreFramework\Mailer\Debug; // Import framework stuff use CoreFramework\Generic\NullPointerException; +use CoreFramework\Mailer\BaseMailer; +use CoreFramework\Mailer\DeliverableMail; use CoreFramework\Manager\Login\ManageableMember; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Template\CompileableTemplate; diff --git a/framework/main/classes/output/class_ b/framework/main/classes/output/class_ index 7504b635..d21367a4 100644 --- a/framework/main/classes/output/class_ +++ b/framework/main/classes/output/class_ @@ -107,7 +107,5 @@ class ???Output extends BaseOutput implements OutputStreamer, Registerable { public function size () { throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/parser/class_ b/framework/main/classes/parser/class_ index 4b056e19..d8721cb3 100644 --- a/framework/main/classes/parser/class_ +++ b/framework/main/classes/parser/class_ @@ -47,7 +47,5 @@ class ???Parser extends BaseParser implements Parseable { // Return the prepared instance return $parserInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/registry/class_ b/framework/main/classes/registry/class_ index 9877fd7e..76e0e745 100644 --- a/framework/main/classes/registry/class_ +++ b/framework/main/classes/registry/class_ @@ -56,7 +56,5 @@ class ???Registry extends BaseRegistry implements Register { // Return the instance return self::$registryInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/request/class_ b/framework/main/classes/request/class_ index e046132a..10b6a14e 100644 --- a/framework/main/classes/request/class_ +++ b/framework/main/classes/request/class_ @@ -90,7 +90,5 @@ class ???Request extends BaseRequest implements Requestable { public final function readCookie ($cookieName) { $this->partialStub("Please implement this method."); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/resolver/class_ b/framework/main/classes/resolver/class_ index fdb146cf..317825e6 100644 --- a/framework/main/classes/resolver/class_ +++ b/framework/main/classes/resolver/class_ @@ -1,7 +1,6 @@ * @version 0.0.0 @@ -139,439 +138,5 @@ class ???Resolver extends BaseResolver implements Resolver { // Return the instance return $!!!Instance; } -} - -// [EOF] -?> - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 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 . - */ -class ???Resolver extends BaseResolver implements Resolver { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set prefix to '???' - $this->setClassPrefix('???'); - } - - /** - * Creates an instance of a Html action resolver with a given default action - * - * @param $!!!Name The default action we shall execute - * @param $appInstance An instance of a manageable application helper class - * @return $resolverInstance The prepared action resolver instance - * @throws EmptyVariableException Thrown if default action is not set - * @throws Invalid|||Exception Thrown if default action is invalid - */ - public static final function create???Resolver ($!!!Name, ManageableApplication $appInstance) { - // Create the new instance - $resolverInstance = new ???Resolver(); - - // Is the variable $!!!Name set and the action is valid? - if (empty($!!!Name)) { - // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { - // Invalid action found - throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } - - // Set the application instance - $resolverInstance->setApplicationInstance($appInstance); - - // Return the prepared instance - return $resolverInstance; - } - - /** - * Returns an action instance for a given request class or null if - * it was not found - * - * @param $requestInstance An instance of a request class - * @return $!!!Instance An instance of the resolved action - * @throws Invalid|||Exception Thrown if $!!!Name is - * invalid - * @throws Invalid|||InstanceException Thrown if $!!!Instance - * is an invalid instance - */ - public function resolve|||ByRequest (Requestable $requestInstance) { - // Init variables - $!!!Name = ''; - $!!!Instance = null; - - // This goes fine so let's resolve the action - $!!!Name = $requestInstance->getRequestElement('action'); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // And validate it - if ((!is_object($!!!Instance)) || (!$!!!Instance instanceof |||able)) { - // This action has an invalid instance! - throw new Invalid|||InstanceException(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Set last action - $this->setResolvedInstance($!!!Instance); - // Return the resolved action instance - return $!!!Instance; - } - - /** - * Resolves the action by its direct name and returns an instance of its class - * - * @return $!!!Instance An instance of the action class - * @throws Invalid|||Exception Thrown if $!!!Name is invalid - */ - public function resolve||| () { - // Initiate the instance variable - $!!!Instance = null; - - // Get action name - $!!!Name = $this->get|||Name(); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) { - $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - } // END - if - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // Return the instance - return $!!!Instance; - } } - -// [EOF] -?> - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 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 . - */ -class ???Resolver extends BaseResolver implements Resolver { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set prefix to '???' - $this->setClassPrefix('???'); - } - - /** - * Creates an instance of a Html action resolver with a given default action - * - * @param $!!!Name The default action we shall execute - * @param $appInstance An instance of a manageable application helper class - * @return $resolverInstance The prepared action resolver instance - * @throws EmptyVariableException Thrown if default action is not set - * @throws Invalid|||Exception Thrown if default action is invalid - */ - public static final function create???Resolver ($!!!Name, ManageableApplication $appInstance) { - // Create the new instance - $resolverInstance = new ???Resolver(); - - // Is the variable $!!!Name set and the action is valid? - if (empty($!!!Name)) { - // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { - // Invalid action found - throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } - - // Set the application instance - $resolverInstance->setApplicationInstance($appInstance); - - // Return the prepared instance - return $resolverInstance; - } - - /** - * Returns an action instance for a given request class or null if - * it was not found - * - * @param $requestInstance An instance of a request class - * @return $!!!Instance An instance of the resolved action - * @throws Invalid|||Exception Thrown if $!!!Name is - * invalid - * @throws Invalid|||InstanceException Thrown if $!!!Instance - * is an invalid instance - */ - public function resolve|||ByRequest (Requestable $requestInstance) { - // Init variables - $!!!Name = ''; - $!!!Instance = null; - - // This goes fine so let's resolve the action - $!!!Name = $requestInstance->getRequestElement('action'); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // And validate it - if ((!is_object($!!!Instance)) || (!$!!!Instance instanceof |||able)) { - // This action has an invalid instance! - throw new Invalid|||InstanceException(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Set last action - $this->setResolvedInstance($!!!Instance); - - // Return the resolved action instance - return $!!!Instance; - } - - /** - * Resolves the action by its direct name and returns an instance of its class - * - * @return $!!!Instance An instance of the action class - * @throws Invalid|||Exception Thrown if $!!!Name is invalid - */ - public function resolve||| () { - // Initiate the instance variable - $!!!Instance = null; - - // Get action name - $!!!Name = $this->get|||Name(); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) { - $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - } // END - if - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // Return the instance - return $!!!Instance; - } -} - -// [EOF] -?> - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 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 . - */ -class ???Resolver extends BaseResolver implements Resolver { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - - // Set prefix to '???' - $this->setClassPrefix('???'); - } - - /** - * Creates an instance of a ??? resolver with a given default action - * - * @param $!!!Name The default action we shall execute - * @param $appInstance An instance of a manageable application helper class - * @return $resolverInstance The prepared action resolver instance - * @throws EmptyVariableException Thrown if default action is not set - * @throws Invalid|||Exception Thrown if default action is invalid - */ - public static final function create???Resolver ($!!!Name, ManageableApplication $appInstance) { - // Create the new instance - $resolverInstance = new ???Resolver(); - - // Is the variable $!!!Name set and the action is valid? - if (empty($!!!Name)) { - // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { - // Invalid action found - throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } - - // Set the application instance - $resolverInstance->setApplicationInstance($appInstance); - - // Return the prepared instance - return $resolverInstance; - } - - /** - * Returns an action instance for a given request class or null if - * it was not found - * - * @param $requestInstance An instance of a request class - * @return $!!!Instance An instance of the resolved action - * @throws Invalid|||Exception Thrown if $!!!Name is - * invalid - * @throws Invalid|||InstanceException Thrown if $!!!Instance - * is an invalid instance - */ - public function resolve|||ByRequest (Requestable $requestInstance) { - // Init variables - $!!!Name = ''; - $!!!Instance = null; - - // This goes fine so let's resolve the action - $!!!Name = $requestInstance->getRequestElement('action'); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // And validate it - if ((!is_object($!!!Instance)) || (!$!!!Instance instanceof |||able)) { - // This action has an invalid instance! - throw new Invalid|||InstanceException(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Set last action - $this->setResolvedInstance($!!!Instance); - - // Return the resolved action instance - return $!!!Instance; - } - - /** - * Resolves the action by its direct name and returns an instance of its class - * - * @return $!!!Instance An instance of the action class - * @throws Invalid|||Exception Thrown if $!!!Name is invalid - */ - public function resolve||| () { - // Initiate the instance variable - $!!!Instance = null; - - // Get action name - $!!!Name = $this->get|||Name(); - - // Is the action empty? Then fall back to default action - if (empty($!!!Name)) { - $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); - } // END - if - - // Check if action is valid - if ($this->is|||Valid($!!!Name) === FALSE) { - // This action is invalid! - throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); - } // END - if - - // Get the action - $!!!Instance = $this->load|||(); - - // Return the instance - return $!!!Instance; - } -} - -// [EOF] -?> diff --git a/framework/main/classes/resolver/command/html/class_Html b/framework/main/classes/resolver/command/html/class_Html index cf4cc1df..3a89a511 100644 --- a/framework/main/classes/resolver/command/html/class_Html +++ b/framework/main/classes/resolver/command/html/class_Html @@ -68,7 +68,5 @@ class Html???CommandResolver extends BaseCommandResolver implements CommandResol // Return the prepared instance return $resolverInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/stacker/class_ b/framework/main/classes/stacker/class_ index 4a15ce2d..af1704ed 100644 --- a/framework/main/classes/stacker/class_ +++ b/framework/main/classes/stacker/class_ @@ -1,4 +1,11 @@ partialStub('stackerName=' . $stackerName); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/stacker/fifo/class_FiFoStacker.php b/framework/main/classes/stacker/fifo/class_FiFoStacker.php index abfca196..981d18a8 100644 --- a/framework/main/classes/stacker/fifo/class_FiFoStacker.php +++ b/framework/main/classes/stacker/fifo/class_FiFoStacker.php @@ -2,6 +2,10 @@ // Own namespace namespace CoreFramework\Stacker; +// Import framework stuff +use CoreFramework\Stacker\BaseStacker; +use CoreFramework\Stacker\Stackable; + /** * A FiFo Stacker class * diff --git a/framework/main/classes/stacker/file/class_ b/framework/main/classes/stacker/file/class_ index 974708aa..952279a2 100644 --- a/framework/main/classes/stacker/file/class_ +++ b/framework/main/classes/stacker/file/class_ @@ -36,7 +36,7 @@ class ???FileStack extends BaseFileStack implements StackableFile, Registerable * Creates an instance of this class * * @param $fileName Absolute Name of stack file - * @return $stackInstance An instance of a Stackable class + * @return $stackInstance An instance of a StackableFile class */ public final static function create???FileStack ($fileName) { // Get new instance @@ -103,7 +103,5 @@ class ???FileStack extends BaseFileStack implements StackableFile, Registerable public function size () { $this->partialStub(); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php b/framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php index a4630c6a..e036b052 100644 --- a/framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php +++ b/framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php @@ -43,7 +43,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable * * @param $fileName Absolute Name of stack file * @param $type Type of this stack (e.g. url_source for URL sources) - * @return $stackInstance An instance of a Stackable class + * @return $stackInstance An instance of a StackableFile class */ public final static function createFiFoFileStack ($fileName, $type) { // Get new instance diff --git a/framework/main/classes/stacker/filo/class_FiLoStacker.php b/framework/main/classes/stacker/filo/class_FiLoStacker.php index 6c280db6..6cc6f69c 100644 --- a/framework/main/classes/stacker/filo/class_FiLoStacker.php +++ b/framework/main/classes/stacker/filo/class_FiLoStacker.php @@ -2,6 +2,10 @@ // Own namespace namespace CoreFramework\Stacker\File; +// Import framework stuff +use CoreFramework\Stacker\BaseStacker; +use CoreFramework\Stacker\Stackable; + /** * A FiLo Stacker class * diff --git a/framework/main/classes/states/class_ b/framework/main/classes/states/class_ index ecd942b0..f211a130 100644 --- a/framework/main/classes/states/class_ +++ b/framework/main/classes/states/class_ @@ -34,7 +34,5 @@ class ???State extends BaseState implements ??Stateable { // Set state name $this->setStateName('!!!'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/streams/class_ b/framework/main/classes/streams/class_ index d7e24e2d..0499c3c8 100644 --- a/framework/main/classes/streams/class_ +++ b/framework/main/classes/streams/class_ @@ -56,7 +56,5 @@ class ???Stream extends BaseStream implements Stream { self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/streams/input/class_ b/framework/main/classes/streams/input/class_ index 0bae09ff..0e5a31c2 100644 --- a/framework/main/classes/streams/input/class_ +++ b/framework/main/classes/streams/input/class_ @@ -56,7 +56,5 @@ class ???InputStream extends BaseStream implements InputStream { self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/streams/output/class_ b/framework/main/classes/streams/output/class_ index 10b3c722..31f9a726 100644 --- a/framework/main/classes/streams/output/class_ +++ b/framework/main/classes/streams/output/class_ @@ -56,7 +56,5 @@ class ???OutputStream extends BaseStream implements OutputStream { self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/tasks/class_ b/framework/main/classes/tasks/class_ index 0925eda3..07a8296d 100644 --- a/framework/main/classes/tasks/class_ +++ b/framework/main/classes/tasks/class_ @@ -76,7 +76,5 @@ class !!!???Task extends BaseTask implements Taskable, Visitable { public function doShutdown () { self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); } -} -// [EOF] -?> +} diff --git a/framework/main/classes/template/class_ b/framework/main/classes/template/class_ index 488c3c14..f1bc2aeb 100644 --- a/framework/main/classes/template/class_ +++ b/framework/main/classes/template/class_ @@ -79,7 +79,5 @@ class ???TemplateEngine extends BaseTemplateEngine implements CompileableTemplat // Return the prepared instance return $templateInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/classes/template/mail/class_MailTemplateEngine.php b/framework/main/classes/template/mail/class_MailTemplateEngine.php index 2c73e33c..78b6dcc6 100644 --- a/framework/main/classes/template/mail/class_MailTemplateEngine.php +++ b/framework/main/classes/template/mail/class_MailTemplateEngine.php @@ -3,6 +3,7 @@ namespace CoreFramework\Template\Engine; // Import framework stuff +use CoreFramework\Mailer\DeliverableMail; use CoreFramework\Parser\Xml\XmlParser; use CoreFramework\Registry\Registry; use CoreFramework\Response\Responseable; diff --git a/framework/main/classes/visitor/class_ b/framework/main/classes/visitor/class_ index 3a63dbcf..d25f7f6c 100644 --- a/framework/main/classes/visitor/class_ +++ b/framework/main/classes/visitor/class_ @@ -47,7 +47,5 @@ class ???Visitor extends BaseVisitor implements Visitor { // Return the prepared instance return $visitorInstance; } -} -// [EOF] -?> +} diff --git a/framework/main/exceptions/class_ b/framework/main/exceptions/class_ index ca8d28af..2af02c8d 100644 --- a/framework/main/exceptions/class_ +++ b/framework/main/exceptions/class_ @@ -33,7 +33,5 @@ class ???Exception extends FrameworkException { // Call parent exception constructor parent::__construct($message, $code); } -} -// [EOF] -?> +} diff --git a/framework/main/exceptions/database/class_ b/framework/main/exceptions/database/class_ index e201cd82..5098f7ba 100644 --- a/framework/main/exceptions/database/class_ +++ b/framework/main/exceptions/database/class_ @@ -33,7 +33,5 @@ class ???Exception extends DatabaseException { // Just call the parent constructor parent::__construct($message, $code); } -} -// [EOF] -?> +} diff --git a/framework/main/interfaces/index/class_Indexable b/framework/main/interfaces/index/class_Indexable index 110b7c29..d07544c2 100644 --- a/framework/main/interfaces/index/class_Indexable +++ b/framework/main/interfaces/index/class_Indexable @@ -22,7 +22,5 @@ * along with this program. If not, see . */ interface Indexable??? extends Indexable { -} -// [EOF] -?> +} diff --git a/framework/main/interfaces/stacker/class_Stackable.php b/framework/main/interfaces/stacker/class_Stackable.php index 8d28f94c..d5ad24ce 100644 --- a/framework/main/interfaces/stacker/class_Stackable.php +++ b/framework/main/interfaces/stacker/class_Stackable.php @@ -1,6 +1,6 @@