| [ Index ] |
|
Code source de Symfony 1.0.0 |
1 <?php 2 /* 3 * $Id: BufferedWriter.php 3076 2006-12-18 08:52:12Z fabien $ 4 * 5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16 * 17 * This software consists of voluntary contributions made by many individuals 18 * and is licensed under the LGPL. For more information please see 19 * <http://phing.info>. 20 */ 21 22 include_once 'phing/system/io/Writer.php'; 23 24 /** 25 * Convenience class for writing files. 26 * 27 * @author Hans Lellelid <hans@xmpl.org> 28 * @version $Revision: 1.10 $ 29 * @package phing.system.io 30 */ 31 class BufferedWriter extends Writer { 32 33 /** 34 * The size of the buffer in kb. 35 */ 36 private $bufferSize = 0; 37 38 /** 39 * The Writer we are buffering output to. 40 */ 41 private $out; 42 43 function __construct(Writer $writer, $buffsize = 8192) { 44 $this->out = $writer; 45 $this->bufferSize = $buffsize; 46 } 47 48 function write($buf, $off = null, $len = null) { 49 return $this->out->write($buf, $off, $len); 50 } 51 52 function newLine() { 53 $this->write(Phing::getProperty('line.separator')); 54 } 55 56 function getResource() { 57 return $this->out->getResource(); 58 } 59 60 function reset() { 61 return $this->out->reset(); 62 } 63 64 function close() { 65 return $this->out->close(); 66 } 67 68 function open() { 69 return $this->out->open(); 70 } 71 72 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |