public function reset($pos = null, $l = 100)
    {
        if ($this->_mode == 0) {
            if (!is_null($pos)) {
                fseek($this->file, $pos);
            }

            $this->buffer = $l > 0 ? fread($this->file, $l) : '';
            $this->length = strlen($this->buffer);
            if ($this->length < $l)
                $this->increaseLength($l - $this->length);
        } else {
            $this->buffer = $this->file;
            $this->length = strlen($this->buffer);
        }
        $this->offset = 0;
        $this->stack = array();
    }
public function reset($pos = null, $l = 100)
    {
        if ($this->_mode == 0) {
            if (!is_null($pos)) {
                fseek($this->file, $pos);
            }

            $this->buffer = $l > 0 ? fread($this->file, $l) : '';
            $this->length = strlen($this->buffer);
            if ($this->length < $l)
                $this->increaseLength($l - $this->length);
        } else {
            $this->buffer = $this->file;
            $this->length = strlen($this->buffer);
        }
        $this->offset = 0;
        $this->stack = array();
    }
public function reset ( $ pos = null , $ l = 100 ) { if ( $ this -> _mode == 0 ) { if ( ! is_null ( $ pos ) ) { fseek ( $ this -> file , $ pos ) ; } $ this -> buffer = $ l > 0 ? fread ( $ this -> file , $ l ) : '' ; $ this -> length = strlen ( $ this -> buffer ) ; if ( $ this -> length < $ l ) $ this -> increaseLength ( $ l - $ this -> length ) ; } else { $ this -> buffer = $ this -> file ; $ this -> length = strlen ( $ this -> buffer ) ; } $ this -> offset = 0 ; $ this -> stack = array ( ) ; }
Reset the position in the file stream.

Optionally move the file pointer to a new location and reset the buffered data.

@param null $pos
@param int $l
Reset the position in the file stream .