Actions

API16

JStream/removeFilter

From Joomla! Documentation

< API16:JStream
Revision as of 05:12, 30 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Remove a filter, either by resource (handed out from the append or prepend function alternatively via getting the filter list) bool Result of operation


[Edit Descripton]

Description:JStream/removeFilter

Syntax

removeFilter(&$resource, $byindex=false)
Parameter Name Default Value Description
&$resource
$byindex false

Returns

bool Result of operation

Defined in

libraries/joomla/filesystem/stream.php

Importing

jimport( 'joomla.filesystem.stream' );

Source Body

function removeFilter(&$resource, $byindex=false)
{
        $res = false;
        // Capture PHP errors
        $php_errormsg = '';
        $track_errors = ini_get('track_errors');
        ini_set('track_errors', true);
        if($byindex) {
                $res = stream_filter_remove($this->filters[$resource]);
        } else {
                $res = stream_filter_remove($resource);
        }
        if($res && $php_errormsg) {
                $this->setError($php_errormsg);
        }
        // restore error tracking to what it was before
        ini_set('track_errors',$track_errors);
        return $res;
}

[Edit See Also] SeeAlso:JStream/removeFilter

Examples

<CodeExamplesForm />