Rearranging scripts to reduce the hassle of updating local application whenever scrip...
[akelos.git] / lib / AkStream.php
blob6efeab4d7e900b10260926f05c17ecb4e1c7d03b
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4 // +----------------------------------------------------------------------+
5 // | Akelos Framework - http://www.akelos.org |
6 // +----------------------------------------------------------------------+
7 // | Copyright (c) 2002-2006, Akelos Media, S.L. & Bermi Ferrer Martinez |
8 // | Released under the GNU Lesser General Public License, see LICENSE.txt|
9 // +----------------------------------------------------------------------+
11 /**
12 * @package ActionController
13 * @subpackage Base
14 * @author Bermi Ferrer <bermi a.t akelos c.om>
15 * @copyright Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org
16 * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html>
19 require_once(AK_LIB_DIR.DS.'Ak.php');
21 class AkStream
23 var $buffer_size;
24 var $path;
26 function AkStream($path, $buffer_size = 4096)
28 $this->buffer_size = empty($buffer_size) ? 4096 : $buffer_size;
29 $this->path = $path;
32 function stream()
34 Ak::stream($this->path, $this->buffer_size);