JStream/appendFilter
From Joomla! Documentation
< API16:JStream
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description
Append a filter to the chain
Syntax
appendFilter($filtername, $read_write=STREAM_FILTER_READ, $params=Array())
Parameter Name | Default Value | Description |
---|---|---|
$filtername | ||
$read_write | STREAM_FILTER_READ | |
$params | Array() |
Defined in
libraries/joomla/filesystem/stream.php
Importing
jimport( 'joomla.filesystem.stream' );
Source Body
function appendFilter($filtername, $read_write=STREAM_FILTER_READ, $params=Array() )
{
$res = false;
if($this->_fh)
{
// Capture PHP errors
$php_errormsg = '';
$track_errors = ini_get('track_errors');
ini_set('track_errors', true);
$res = @stream_filter_append($this->_fh, $filtername, $read_write, $params);
if(!$res && $php_errormsg) {
$this->setError($php_errormsg);
} else {
$this->filters[] =& $res;
}
// restore error tracking to what it was before
ini_set('track_errors',$track_errors);
}
return $res;
}