]> git.mxchange.org Git - core.git/commitdiff
Added new general I/O stream classes and interfaces. Still the interfaces have no...
authorRoland Häder <roland@mxchange.org>
Thu, 14 Apr 2011 20:41:26 +0000 (20:41 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 14 Apr 2011 20:41:26 +0000 (20:41 +0000)
13 files changed:
.gitattributes
inc/classes/interfaces/streams/input/.htaccess [new file with mode: 0644]
inc/classes/interfaces/streams/input/class_InputStreamable.php [new file with mode: 0644]
inc/classes/interfaces/streams/output/.htaccess [new file with mode: 0644]
inc/classes/interfaces/streams/output/class_OutputStreamable.php [new file with mode: 0644]
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/output/class_WebOutput.php
inc/classes/main/streams/class_
inc/classes/main/streams/crypto/class_NullCryptoStream.php
inc/classes/main/streams/input/.htaccess [new file with mode: 0644]
inc/classes/main/streams/input/class_BaseInputStream.php [new file with mode: 0644]
inc/classes/main/streams/output/.htaccess [new file with mode: 0644]
inc/classes/main/streams/output/class_BaseOutputStream.php [new file with mode: 0644]

index 4180940b4b465b2760e676c117d606b8aaa54892..adabfe5bf55c0680e00d53de35f8c21d62912607 100644 (file)
@@ -231,6 +231,10 @@ inc/classes/interfaces/streams/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/streams/class_Streamable.php -text svneol=unset#text/plain
 inc/classes/interfaces/streams/crypto/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/streams/crypto/class_EncryptableStream.php -text svneol=unset#text/plain
+inc/classes/interfaces/streams/input/.htaccess svneol=native#text/plain
+inc/classes/interfaces/streams/input/class_InputStreamable.php svneol=native#text/plain
+inc/classes/interfaces/streams/output/.htaccess svneol=native#text/plain
+inc/classes/interfaces/streams/output/class_OutputStreamable.php svneol=native#text/plain
 inc/classes/interfaces/template/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/template/class_CompileableTemplate.php -text svneol=unset#text/plain
 inc/classes/interfaces/template/view/class_ViewHelper.php -text svneol=unset#text/plain
@@ -523,6 +527,10 @@ inc/classes/main/streams/class_BaseStream.php -text svneol=unset#text/plain
 inc/classes/main/streams/crypto/.htaccess -text svneol=unset#text/plain
 inc/classes/main/streams/crypto/class_McryptStream.php -text svneol=unset#text/plain
 inc/classes/main/streams/crypto/class_NullCryptoStream.php -text svneol=unset#text/plain
+inc/classes/main/streams/input/.htaccess svneol=native#text/plain
+inc/classes/main/streams/input/class_BaseInputStream.php svneol=native#text/plain
+inc/classes/main/streams/output/.htaccess svneol=native#text/plain
+inc/classes/main/streams/output/class_BaseOutputStream.php svneol=native#text/plain
 inc/classes/main/template/.htaccess -text svneol=unset#text/plain
 inc/classes/main/template/class_ -text svneol=unset#text/plain
 inc/classes/main/template/class_BaseTemplateEngine.php -text svneol=unset#text/plain
diff --git a/inc/classes/interfaces/streams/input/.htaccess b/inc/classes/interfaces/streams/input/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/streams/input/class_InputStreamable.php b/inc/classes/interfaces/streams/input/class_InputStreamable.php
new file mode 100644 (file)
index 0000000..bb0f538
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An InputStreamable interface
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 <http://www.gnu.org/licenses/>.
+ */
+interface InputStreamable extends Streamable {
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/interfaces/streams/output/.htaccess b/inc/classes/interfaces/streams/output/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/streams/output/class_OutputStreamable.php b/inc/classes/interfaces/streams/output/class_OutputStreamable.php
new file mode 100644 (file)
index 0000000..c3dbddb
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An OutputStreamable interface
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 <http://www.gnu.org/licenses/>.
+ */
+interface OutputStreamable extends Streamable {
+}
+
+// [EOF]
+?>
index 9c21c444d73114207513ab69b8914fe56f15a7cd..38379b289eb857a1c9c713604b6240641a0a165f 100644 (file)
@@ -70,10 +70,13 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
         * @return      $consoleInstance        An instance of this class
         */
        public static final function getInstance() {
+               // Is the self-instance already set?
                if (is_null(self::$consoleInstance)) {
                        $contentType = FrameworkConfiguration::getInstance()->getConfigEntry('web_content_type');
                        self::$consoleInstance = ConsoleOutput::createConsoleOutput($contentType);
-               }
+               } // END - if
+
+               // Return the instance
                return self::$consoleInstance;
        }
 
index 9c44b06e6c481da544d12fd82a533b981edcc0f1..ff175d0bd10ba137d914b234fdefd5856ccb850d 100644 (file)
@@ -45,7 +45,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer, Registera
         * @return      $debugInstance                  An instance of this middleware class
         */
        public static final function createWebOutput (ManageableApplication $applicationInstance) {
-               // Is there no instance?
+               // Is the self-instance already set?
                if (is_null(self::$webInstance)) {
                        // Get a new instance and set it
                        self::$webInstance = new WebOutput();
index 5da46a420e3cfc4186ae76db4a2b0ef833500815..d556b5ba11d888269211cc0341023897dc540263 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A 
+ * A ???Stream class
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
index b7c1cf2ed45f8b646862204c5cffc0809cd0fd61..bcaab6f007e631b040bbd6118605349b083c8995 100644 (file)
@@ -66,7 +66,7 @@ class NullCryptoStream extends BaseStream implements EncryptableStream {
         * @param       $encrypted      Encrypted string
         * @return      $str            The unencrypted string
         */
-       function decryptStream ($encrypted) {
+       public function decryptStream ($encrypted) {
                // Just handle it over
                $str = (string) $encrypted;
 
diff --git a/inc/classes/main/streams/input/.htaccess b/inc/classes/main/streams/input/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/streams/input/class_BaseInputStream.php b/inc/classes/main/streams/input/class_BaseInputStream.php
new file mode 100644 (file)
index 0000000..353eda9
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * A general InputStream class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+class BaseInputStream extends BaseStream {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/streams/output/.htaccess b/inc/classes/main/streams/output/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/streams/output/class_BaseOutputStream.php b/inc/classes/main/streams/output/class_BaseOutputStream.php
new file mode 100644 (file)
index 0000000..d76a1cb
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * A general OutputStream class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+class BaseOutputStream extends BaseStream {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+}
+
+// [EOF]
+?>