From: Roland Haeder Date: Tue, 28 Feb 2017 19:51:53 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=c34b5832c319583e8fb0e70eddbe0ffc80e034a2 Continued: - added namespace to class config entries - added "import" of SeekableWritableFileIterator and BaseIterator - added "import" of Iterator (SPL) - added "import" of BaseFeature and Feature - added missing class EmailVerifierFilter - added "import" of BaseFilter, Filterable, Requestable and Responseable - added "import" of BaseInputTextFile and CsvInputStreamer - also added missing namespace in class Signed-off-by: Roland Häder --- diff --git a/framework/config.php b/framework/config.php index c0afdd57..90517550 100644 --- a/framework/config.php +++ b/framework/config.php @@ -95,10 +95,10 @@ $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/'); $cfg->setConfigEntry('html_template_class', 'CoreFramework\Template\Engine\HtmlTemplateEngine'); // CFG: DECO-XML-REWRITER-TEMPLATE-CLASS -$cfg->setConfigEntry('deco_xml_rewriter_template_class', 'XmlRewriterTemplateDecorator'); +$cfg->setConfigEntry('deco_xml_rewriter_template_class', 'CoreFramework\Template\Xml\XmlRewriterTemplateDecorator'); // CFG: DEBUG-HTML-CLASS -$cfg->setConfigEntry('debug_html_class', 'DebugWebOutput'); +$cfg->setConfigEntry('debug_html_class', 'CoreFramework\Output\Debug\DebugWebOutput'); // CFG: DEBUG-CONSOLE-CLASS $cfg->setConfigEntry('debug_console_class', 'CoreFramework\Debug\Output\DebugConsoleOutput'); @@ -173,7 +173,7 @@ $cfg->setConfigEntry('cache_class', 'MemoryCache'); $cfg->setConfigEntry('search_criteria_class', 'CoreFramework\Criteria\Search\SearchCriteria'); // CFG: DATASET-CRITERIA-CLASS -$cfg->setConfigEntry('dataset_criteria_class', 'DataSetCriteria'); +$cfg->setConfigEntry('dataset_criteria_class', 'CoreFramework\Criteria\DataSet\DataSetCriteria'); // CFG: UPDATE-CRITERIA-CLASS $cfg->setConfigEntry('update_criteria_class', 'CoreFramework\Criteria\Update\UpdateCriteria'); @@ -194,7 +194,7 @@ $cfg->setConfigEntry('file_input_class', 'CoreFramework\Stream\Filesystem\FileIo $cfg->setConfigEntry('file_output_class', 'CoreFramework\Stream\Filesystem\FileIoStream'); // CFG: EMAIL-VALIDATOR-FILTER-CLASS -$cfg->setConfigEntry('email_validator_filter_class', 'EmailValidatorFilter'); +$cfg->setConfigEntry('email_validator_filter_class', 'CoreFramework\Filter\Validator\Email\EmailValidatorFilter'); // CFG: USERNAME-VALIDATOR-FILTER-CLASS $cfg->setConfigEntry('username_validator_filter_class', 'CoreFramework\Filter\Validator\Username\UserNameValidatorFilter'); @@ -215,7 +215,7 @@ $cfg->setConfigEntry('username_verifier_filter_class', 'CoreFramework\Filter\Ver $cfg->setConfigEntry('user_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserGuestVerifierFilter'); // CFG: EMAIL-VERIFIER-FILTER-CLASS -$cfg->setConfigEntry('email_verifier_filter_class', 'EmailVerifierFilter'); +$cfg->setConfigEntry('email_verifier_filter_class', 'CoreFramework\Filter\Verifier\Email\EmailVerifierFilter'); // CFG: PASSWORD-VERIFIER-FILTER-CLASS $cfg->setConfigEntry('password_verifier_filter_class', 'CoreFramework\Filter\Verifier\Password\PasswordVerifierFilter'); @@ -224,7 +224,7 @@ $cfg->setConfigEntry('password_verifier_filter_class', 'CoreFramework\Filter\Ver $cfg->setConfigEntry('passwd_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\PasswordGuestVerifierFilter'); // CFG: EMAIL-CHANGE-FILTER-CLASS -$cfg->setConfigEntry('email_change_filter_class', 'EmailChangeFilter'); +$cfg->setConfigEntry('email_change_filter_class', 'CoreFramework\Filter\Change\Email\EmailChangeFilter'); // CFG: PASSWORD-CHANGE-FILTER-CLASS $cfg->setConfigEntry('password_change_filter_class', 'CoreFramework\Filter\Change\Password\PasswordChangeFilter'); @@ -269,7 +269,7 @@ $cfg->setConfigEntry('mailer_class', 'CoreFramework\Mailer\Debug\DebugMailer'); $cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser'); // CFG: DECO-COMPACTING-XML-PARSER-CLASS -$cfg->setConfigEntry('deco_compacting_xml_parser_class', 'XmlCompactorDecorator'); +$cfg->setConfigEntry('deco_compacting_xml_parser_class', 'CoreFramework\Parser\Xml\XmlCompactorDecorator'); // CFG: MATH-PRIME $cfg->setConfigEntry('math_prime', 591623); @@ -374,22 +374,22 @@ $cfg->setConfigEntry('database_cache_enabled', FALSE); $cfg->setConfigEntry('directory_class', 'CoreFramework\Filesytem\Pointer\FrameworkDirectoryPointer'); // CFG: FILE-RAW-INPUT-CLASS -$cfg->setConfigEntry('file_raw_input_class', 'FrameworkRawFileInputPointer'); +$cfg->setConfigEntry('file_raw_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkRawFileInputPointer'); // CFG: FILE-RAW-OUTPUT-CLASS -$cfg->setConfigEntry('file_raw_output_class', 'FrameworkRawFileOutputPointer'); +$cfg->setConfigEntry('file_raw_output_class', 'CoreFramework\Filesystem\Pointer\Output\FrameworkRawFileOutputPointer'); // CFG: FILE-RAW-INPUT-OUTPUT-CLASS -$cfg->setConfigEntry('file_raw_input_output_class', 'FrameworkFileInputOutputPointer'); +$cfg->setConfigEntry('file_raw_input_output_class', 'CoreFramework\Filesystem\Pointer\FrameworkFileInputOutputPointer'); // CFG: TEXT-FILE-INPUT-CLASS $cfg->setConfigEntry('text_file_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkTextFileInputPointer'); // CFG: CSV-INPUT-FILE-CLASS -$cfg->setConfigEntry('csv_input_file_class', 'CsvInputFile'); +$cfg->setConfigEntry('csv_input_file_class', 'CoreFramework\Filesystem\Input\Csv\CsvInputFile'); // CFG: FILE-ITERATOR-CLASS -$cfg->setConfigEntry('file_iterator_class', 'FileIterator'); +$cfg->setConfigEntry('file_iterator_class', 'CoreFramework\Iterator\File\FileIterator'); // CFG: FILE-STACK-PRE-ALLOCATE-ENABLED $cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y'); @@ -422,7 +422,7 @@ $cfg->setConfigEntry('task_list_class', 'CoreFramework\Lists\Task\TaskList'); $cfg->setConfigEntry('list_group_class', 'CoreFramework\Lists\Group\ListGroupList'); // CFG: DEFAULT-ITERATOR-CLASS -$cfg->setConfigEntry('default_iterator_class', 'DefaultIterator'); +$cfg->setConfigEntry('default_iterator_class', 'CoreFramework\Iterator\DefaultIterator'); // CFG: ACTIVE-TASK-VISITOR-CLASS $cfg->setConfigEntry('active_task_visitor_class', 'ActiveTaskVisitor'); @@ -458,7 +458,7 @@ $cfg->setConfigEntry('menu_template_class', 'CoreFramework\Template\Engine\MenuT $cfg->setConfigEntry('menu_template_extension', '.xml'); // CFG: FEATURE-FUSE-CLASS -$cfg->setConfigEntry('feature_fuse_class', 'FuseFeature'); +$cfg->setConfigEntry('feature_fuse_class', 'CoreFramework\Feature\Fuse\FuseFeature'); // CFG: TEMP-FILE-PATH $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir()); diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 6424b788..2c0d7db0 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -43,6 +43,7 @@ use CoreFramework\Wrapper\Database\DatabaseWrapper; // Import SPL stuff use \stdClass; +use \Iterator; use \ReflectionClass; /** diff --git a/framework/main/classes/feature/class_ b/framework/main/classes/feature/class_ index 89d86886..e9991521 100644 --- a/framework/main/classes/feature/class_ +++ b/framework/main/classes/feature/class_ @@ -1,4 +1,11 @@ . */ -class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer { +class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer { /** * Protected constructor * @@ -50,7 +50,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws FileIoException If fopen() returns not a file resource * @return void */ - public static final function createFrameworkRawFileOutputPointer ($fileName, $mode) { + public static final function createFrameworkTextFileOutputPointer ($fileName, $mode) { // Some pre-sanity checks... if (is_null($fileName)) { // No filename given @@ -65,7 +65,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer } // END - if // Create new instance - $pointerInstance = new FrameworkRawFileOutputPointer(); + $pointerInstance = new FrameworkTextFileOutputPointer(); // Set file pointer and file name $pointerInstance->setPointer($filePointer); diff --git a/framework/main/classes/file_directories/text/input/class_BaseInputTextFile.php b/framework/main/classes/file_directories/text/input/class_BaseInputTextFile.php index a8ff8874..471e1fa7 100644 --- a/framework/main/classes/file_directories/text/input/class_BaseInputTextFile.php +++ b/framework/main/classes/file_directories/text/input/class_BaseInputTextFile.php @@ -4,6 +4,7 @@ namespace CoreFramework\Filesystem\Text; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Filesystem\File\BaseTextFile; /** * A general text input file class diff --git a/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php b/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php index e004980b..93c9aec1 100644 --- a/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php +++ b/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php @@ -1,4 +1,11 @@ partialStub("Please implement this method."); + $this->partialStub('Please implement this method.'); } } diff --git a/framework/main/classes/filter/verifier/class_EmailVerifierFilter.php b/framework/main/classes/filter/verifier/class_EmailVerifierFilter.php new file mode 100644 index 00000000..2d3278b2 --- /dev/null +++ b/framework/main/classes/filter/verifier/class_EmailVerifierFilter.php @@ -0,0 +1,71 @@ + + * @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 EmailVerifierFilter extends BaseFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createEmailVerifierFilter () { + // Get a new instance + $filterInstance = new EmailVerifierFilter(); + + // 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 + * @throws FilterChainException If this filter fails to operate + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Implement this! + $this->partialStub('Please implement this method.'); + } + +} diff --git a/framework/main/classes/index/class_BaseIndex.php b/framework/main/classes/index/class_BaseIndex.php index d035d617..514b00a8 100644 --- a/framework/main/classes/index/class_BaseIndex.php +++ b/framework/main/classes/index/class_BaseIndex.php @@ -5,6 +5,7 @@ namespace CoreFramework\Index; // Import framework stuff use CoreFramework\Factory\ObjectFactory; use CoreFramework\Filesystem\File\BaseBinaryFile; +use CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/framework/main/classes/iterator/class_ b/framework/main/classes/iterator/class_ index 5fc5dc53..f91439a0 100644 --- a/framework/main/classes/iterator/class_ +++ b/framework/main/classes/iterator/class_ @@ -1,4 +1,10 @@