Source for file string.php
Documentation is available at string.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
jimport('joomla.filesystem.support.stringcontroller');
* This class allows you to use a PHP string in the same way that
* you would normally use a regular stream wrapper
* @package Joomla.Platform
* Enter description here ...
* Enter description here ...
* @see http://us.php.net/manual/en/function.stat.php
* Method to open a file or URL.
* @param string $path The stream path.
* @param string $mode Not used.
* @param integer $options Not used.
* @param string &$opened_path Not used.
public function stream_open($path, $mode, $options, &$opened_path)
* Method to retrieve information from a file resource
* @see http://www.php.net/manual/en/streamwrapper.stream-stat.php
* Method to retrieve information about a file.
* @param string $path File path or URL to stat
* @param integer $flags Additional flags set by the streams API
* @see http://php.net/manual/en/streamwrapper.url-stat.php
public function url_stat($path, $flags =
0)
* Method to read a given number of bytes starting at the current position
* and moving to the end of the string defined by the current position plus the
* @param integer $count Bytes of data from the current position should be returned.
* @see http://www.php.net/manual/en/streamwrapper.stream-read.php
* Stream write, always returning false.
* @param string $data The data to write.
* @note Updating the string is not supported.
// We don't support updating the string.
* Method to get the current position
* @return integer The position
* @return boolean True if at end of field.
* @param integer $offset The starting offset.
* @param integer $whence SEEK_SET, SEEK_CUR, SEEK_END
* @return boolean True on success.
// $whence: SEEK_SET, SEEK_CUR, SEEK_END
if ($offset >
$this->len)
// We can't seek beyond our len.
if (($this->pos +
$offset) <
$this->len)
$this->pos =
$this->len -
$offset;
* Stream flush, always returns true.
* @note Data storage is not supported
Documentation generated on Tue, 19 Nov 2013 15:14:32 +0100 by phpDocumentor 1.4.3