summaryrefslogtreecommitdiff
path: root/framework/IO
diff options
context:
space:
mode:
Diffstat (limited to 'framework/IO')
-rw-r--r--framework/IO/ITextWriter.php34
-rw-r--r--framework/IO/TTarFileExtractor.php2
-rw-r--r--framework/IO/TTextWriter.php2
3 files changed, 36 insertions, 2 deletions
diff --git a/framework/IO/ITextWriter.php b/framework/IO/ITextWriter.php
new file mode 100644
index 00000000..d22e5cfe
--- /dev/null
+++ b/framework/IO/ITextWriter.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Core interfaces essential for TApplication class.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package Prado\IO
+ */
+
+namespace Prado\IO;
+
+/**
+ * ITextWriter interface.
+ *
+ * This interface must be implemented by writers.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package Prado\IO
+ * @since 3.0
+ */
+interface ITextWriter
+{
+ /**
+ * Writes a string.
+ * @param string string to be written
+ */
+ public function write($str);
+ /**
+ * Flushes the content that has been written.
+ */
+ public function flush();
+} \ No newline at end of file
diff --git a/framework/IO/TTarFileExtractor.php b/framework/IO/TTarFileExtractor.php
index e8eee004..672ea59b 100644
--- a/framework/IO/TTarFileExtractor.php
+++ b/framework/IO/TTarFileExtractor.php
@@ -126,7 +126,7 @@ class TTarFileExtractor
protected function _error($p_message)
{
- throw new Exception($p_message);
+ throw new \Exception($p_message);
}
private function _isArchive($p_filename=null)
diff --git a/framework/IO/TTextWriter.php b/framework/IO/TTextWriter.php
index d9033b81..c47bc410 100644
--- a/framework/IO/TTextWriter.php
+++ b/framework/IO/TTextWriter.php
@@ -22,7 +22,7 @@ namespace Prado\IO;
* @package Prado\IO
* @since 3.0
*/
-class TTextWriter extends TComponent implements ITextWriter
+class TTextWriter extends \Prado\TComponent implements \Prado\IO\ITextWriter
{
private $_str='';