Actions

API16

JStream/applyContextToStream

From Joomla! Documentation

< API16:JStream
Revision as of 17:48, 22 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

Applies the current context to the stream Use this to change the values of the context after you've opened a stream

[Edit Descripton]

Description:JStream/applyContextToStream

Syntax

applyContextToStream()


Defined in

libraries/joomla/filesystem/stream.php

Importing

jimport( 'joomla.filesystem.stream' );

Source Body

function applyContextToStream()
{
        $retval = false;
        if($this->_fh)
        {
                // Capture PHP errors
                $php_errormsg = 'Unknown error setting context option';
                $track_errors = ini_get('track_errors');
                ini_set('track_errors', true);
                $retval = @stream_context_set_option($this->_fh, $this->_contextOptions);
                if(!$retval) {
                        $this->setError($php_errormsg);
                }
                // restore error tracking to what it was before
                ini_set('track_errors',$track_errors);
        }
        return $retval;
}

[Edit See Also] SeeAlso:JStream/applyContextToStream

Examples

<CodeExamplesForm />