From: Roland Häder Date: Thu, 9 Jul 2009 17:33:12 +0000 (+0000) Subject: Stream classes added to rewrite CrytoHelper X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=cf051d640b6bd159376cf35e186fa9bb2a9cd7ae Stream classes added to rewrite CrytoHelper --- diff --git a/.gitattributes b/.gitattributes index fcbfa764..c55b41d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -439,6 +439,12 @@ inc/classes/main/result/.htaccess -text inc/classes/main/result/class_DatabaseResult.php -text inc/classes/main/rng/.htaccess -text inc/classes/main/rng/class_RandomNumberGenerator.php -text +inc/classes/main/streams/.htaccess -text +inc/classes/main/streams/class_ -text +inc/classes/main/streams/class_BaseStream.php -text +inc/classes/main/streams/crypto/.htaccess -text +inc/classes/main/streams/crypto/class_McryptStream.php -text +inc/classes/main/streams/crypto/class_NullCryptoStream.php -text inc/classes/main/template/.htaccess -text inc/classes/main/template/class_ -text inc/classes/main/template/class_BaseTemplateEngine.php -text diff --git a/inc/classes/main/streams/.htaccess b/inc/classes/main/streams/.htaccess new file mode 100644 index 00000000..3a428827 --- /dev/null +++ b/inc/classes/main/streams/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/classes/main/streams/class_ b/inc/classes/main/streams/class_ new file mode 100644 index 00000000..5da46a42 --- /dev/null +++ b/inc/classes/main/streams/class_ @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 ???Stream extends BaseStream implements Streamable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this node class + * + * @return $streamInstance An instance of this node class + */ + public final static function create???Stream (Requestable $requestInstance) { + // Get a new instance + $streamInstance = new ???Stream(); + + // Return the instance + return $streamInstance; + } +} + +// [EOF] +?> diff --git a/inc/classes/main/streams/class_BaseStream.php b/inc/classes/main/streams/class_BaseStream.php new file mode 100644 index 00000000..e226545a --- /dev/null +++ b/inc/classes/main/streams/class_BaseStream.php @@ -0,0 +1,42 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 BaseStream extends BaseFrameworkSystem { + /** + * Protected constructor + * + * @param $className Name of the class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + + // Clean up a little + $this->removeNumberFormaters(); + $this->removeSystemArray(); + } +} + +// [EOF] +?> diff --git a/inc/classes/main/streams/crypto/.htaccess b/inc/classes/main/streams/crypto/.htaccess new file mode 100644 index 00000000..3a428827 --- /dev/null +++ b/inc/classes/main/streams/crypto/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/classes/main/streams/crypto/class_McryptStream.php b/inc/classes/main/streams/crypto/class_McryptStream.php new file mode 100644 index 00000000..2a0127b3 --- /dev/null +++ b/inc/classes/main/streams/crypto/class_McryptStream.php @@ -0,0 +1,50 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 McryptStream extends BaseStream { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this node class + * + * @return $streamInstance An instance of this node class + */ + public final static function createMcryptStream () { + // Get a new instance + $streamInstance = new McryptStream(); + + // Return the instance + return $streamInstance; + } +} + +// [EOF] +?> diff --git a/inc/classes/main/streams/crypto/class_NullCryptoStream.php b/inc/classes/main/streams/crypto/class_NullCryptoStream.php new file mode 100644 index 00000000..1e905bcc --- /dev/null +++ b/inc/classes/main/streams/crypto/class_NullCryptoStream.php @@ -0,0 +1,51 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 NullCryptoStream extends BaseStream implements Streamable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this node class + * + * @return $streamInstance An instance of this node class + */ + public final static function createNullCryptoStream () { + // Get a new instance + $streamInstance = new NullCryptoStream(); + + // Return the instance + return $streamInstance; + } +} + +// [EOF] +?>