JStreamString/stream open: Difference between revisions
From Joomla! Documentation
No edit summary |
m clean up |
||
| Line 1: | Line 1: | ||
{{subst:Description:JStreamString/stream_open}} | |||
{{Description:JStreamString/stream_open}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 55: | Line 50: | ||
</source> | </source> | ||
{{subst:SeeAlso:JStreamString/stream_open}} | |||
{{SeeAlso:JStreamString/stream_open}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:27, 24 March 2017
{{subst:Description:JStreamString/stream_open}}
Syntax
stream_open($path, $mode, $options, &$opened_path)
| Parameter Name | Default Value | Description |
|---|---|---|
| $path | ||
| $mode | ||
| $options | ||
| &$opened_path |
Defined in
libraries/joomla/filesystem/streams/string.php
Importing
jimport( 'joomla.filesystem.streams.string' );
Source Body
function stream_open($path, $mode, $options, &$opened_path)
{
$this->_currentstring =& JStringController::getRef(str_replace('string://','',$path));
if($this->_currentstring)
{
$this->_len = strlen($this->_currentstring);
$this->_pos = 0;
$this->_stat = $this->url_stat($path, 0);
return true;
}
else {
return false;
}
}
{{subst:SeeAlso:JStreamString/stream_open}}
Examples
<CodeExamplesForm />