Added streamData() method to interface Streamable
[core.git] / inc / classes / main / streams / crypto / class_McryptStream.php
index a0fc4b53a149a8efee6b3a7b351d14d941c8d2ce..829f35bc7eeb93c530758d991e849512dd5e7583 100644 (file)
@@ -150,6 +150,18 @@ class McryptStream extends BaseStream implements EncryptableStream {
                // Return the string
                return $str;
        }
+
+       /**
+        * Streams the data and maybe does something to it
+        *
+        * @param       $data   The data (string mostly) to "stream"
+        * @return      $data   The data (string mostly) to "stream"
+        * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
+        */
+       public function streamData ($data) {
+               $this->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
 }
 
 // [EOF]