* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
interface Streamable extends FrameworkInterface {
+ /**
+ * 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"
+ */
+ function streamData ($data);
}
// [EOF]
// Return the instance
return $streamInstance;
}
+
+ /**
+ * 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
+ */
+ public function streamData ($data) {
+ $this->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+ throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ }
}
// [EOF]
// 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]
// Return it
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]