[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/IO/ -> TTextWriter.php (source)

   1  <?php
   2  /**
   3   * TTextWriter class file
   4   *
   5   * @author Qiang Xue <qiang.xue@gmail.com>
   6   * @link http://www.pradosoft.com/
   7   * @copyright Copyright &copy; 2005 PradoSoft
   8   * @license http://www.pradosoft.com/license/
   9   * @version $Id: TTextWriter.php 1397 2006-09-07 07:55:53Z wei $
  10   * @package System.IO
  11   */
  12  
  13  /**
  14   * TTextWriter class.
  15   *
  16   * TTextWriter implements a memory-based text writer.
  17   * Content written by TTextWriter are stored in memory
  18   * and can be obtained by calling {@link flush()}.
  19   *
  20   * @author Qiang Xue <qiang.xue@gmail.com>
  21   * @version $Id: TTextWriter.php 1397 2006-09-07 07:55:53Z wei $
  22   * @package System.IO
  23   * @since 3.0
  24   */
  25  class TTextWriter extends TComponent implements ITextWriter
  26  {
  27      private $_str='';
  28  
  29      /**
  30       * Flushes the content that has been written.
  31       * @return string the content being flushed
  32       */
  33  	public function flush()
  34      {
  35          $str=$this->_str;
  36          $this->_str='';
  37          return $str;
  38      }
  39  
  40      /**
  41       * Writes a string.
  42       * @param string string to be written
  43       */
  44  	public function write($str)
  45      {
  46          $this->_str.=$str;
  47      }
  48  
  49      /**
  50       * Writers a string and terminates it with a newline.
  51       * @param string content to be written
  52       * @see write
  53       */
  54  	public function writeLine($str='')
  55      {
  56          $this->write($str."\n");
  57      }
  58  }
  59  
  60  ?>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7