Joomla Platform
13.1
Documentation des API du framework Joomla Platform
|
Fonctions membres publiques | |
__construct ($writeprefix= '', $readprefix= '', $context=array()) | |
__destruct () | |
open ($filename, $mode= 'r', $use_include_path=false, $context=null, $use_prefix=false, $relative=false, $detectprocessingmode=false) | |
close () | |
eof () | |
filesize () | |
gets ($length=0) | |
read ($length=0) | |
seek ($offset, $whence=SEEK_SET) | |
tell () | |
write (&$string, $length=0, $chunk=0) | |
chmod ($filename= '', $mode=0) | |
get_meta_data () | |
_buildContext () | |
setContextOptions ($context) | |
addContextEntry ($wrapper, $name, $value) | |
deleteContextEntry ($wrapper, $name) | |
applyContextToStream () | |
appendFilter ($filtername, $read_write=STREAM_FILTER_READ, $params=array()) | |
prependFilter ($filtername, $read_write=STREAM_FILTER_READ, $params=array()) | |
removeFilter (&$resource, $byindex=false) | |
copy ($src, $dest, $context=null, $use_prefix=true, $relative=false) | |
move ($src, $dest, $context=null, $use_prefix=true, $relative=false) | |
delete ($filename, $context=null, $use_prefix=true, $relative=false) | |
upload ($src, $dest, $context=null, $use_prefix=true, $relative=false) | |
writeFile ($filename, &$buffer) | |
_getFilename ($filename, $mode, $use_prefix, $relative) | |
getFileHandle () | |
Fonctions membres publiques inherited from JObject | |
__construct ($properties=null) | |
__toString () | |
def ($property, $default=null) | |
get ($property, $default=null) | |
getProperties ($public=true) | |
getError ($i=null, $toString=true) | |
getErrors () | |
set ($property, $value=null) | |
setProperties ($properties) | |
setError ($error) |
Attributs protégés | |
$filemode = 0644 | |
$dirmode = 0755 | |
$chunksize = 8192 | |
$filename | |
$writeprefix | |
$readprefix | |
$processingmethod = 'f' | |
$filters = array() | |
$fh | |
$filesize | |
$context = null | |
$contextOptions | |
$openmode | |
Attributs protégés inherited from JObject | |
$_errors = array() |
Définition à la ligne 30 du fichier stream.php.
JStream::__construct | ( | $writeprefix = '' , |
|
$readprefix = '' , |
|||
$context = array() |
|||
) |
Constructor
string | $writeprefix | Prefix of the stream (optional). Unlike the JPATH_*, this has a final path separator! |
string | $readprefix | The read prefix (optional). |
array | $context | The context options (optional). |
Définition à la ligne 146 du fichier stream.php.
JStream::__destruct | ( | ) |
Destructor
Définition à la ligne 159 du fichier stream.php.
JStream::_buildContext | ( | ) |
Stream contexts Builds the context from the array
Définition à la ligne 920 du fichier stream.php.
JStream::_getFilename | ( | $filename, | |
$mode, | |||
$use_prefix, | |||
$relative | |||
) |
Determine the appropriate 'filename' of a file
string | $filename | Original filename of the file |
string | $mode | Mode string to retrieve the filename |
boolean | $use_prefix | Controls the use of a prefix |
boolean | $relative | Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped. |
Définition à la ligne 1382 du fichier stream.php.
Références JFilesystemHelper\getWriteModes().
JStream::addContextEntry | ( | $wrapper, | |
$name, | |||
$value | |||
) |
Adds a particular options to the context
string | $wrapper | The wrapper to use |
string | $name | The option to set |
string | $value | The value of the option |
Définition à la ligne 964 du fichier stream.php.
JStream::appendFilter | ( | $filtername, | |
$read_write = STREAM_FILTER_READ , |
|||
$params = array() |
|||
) |
Stream filters Append a filter to the chain
string | $filtername | The key name of the filter. |
integer | $read_write | Optional. Defaults to STREAM_FILTER_READ. |
array | $params | An array of params for the stream_filter_append call. |
Définition à la ligne 1051 du fichier stream.php.
JStream::applyContextToStream | ( | ) |
Applies the current context to the stream
Use this to change the values of the context after you've opened a stream
Définition à la ligne 1014 du fichier stream.php.
JStream::chmod | ( | $filename = '' , |
|
$mode = 0 |
|||
) |
Chmod wrapper
string | $filename | File name. |
mixed | $mode | Mode to use. |
Définition à la ligne 834 du fichier stream.php.
Références JText\_(), et JFilesystemHelper\ftpChmod().
JStream::close | ( | ) |
Attempt to close a file handle
Will return false if it failed and true on success If the file is not open the system will return true, this function destroys the file handle as well
Définition à la ligne 305 du fichier stream.php.
Références JText\_().
JStream::copy | ( | $src, | |
$dest, | |||
$context = null , |
|||
$use_prefix = true , |
|||
$relative = false |
|||
) |
Copy a file from src to dest
string | $src | The file path to copy from. |
string | $dest | The file path to copy to. |
resource | $context | A valid context resource (optional) created with stream_context_create. |
boolean | $use_prefix | Controls the use of a prefix (optional). |
boolean | $relative | Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped. |
Définition à la ligne 1173 du fichier stream.php.
JStream::delete | ( | $filename, | |
$context = null , |
|||
$use_prefix = true , |
|||
$relative = false |
|||
) |
Delete a file
string | $filename | The file path to delete. |
resource | $context | A valid context resource (optional) created with stream_context_create. |
boolean | $use_prefix | Controls the use of a prefix (optional). |
boolean | $relative | Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped. |
Définition à la ligne 1282 du fichier stream.php.
JStream::deleteContextEntry | ( | $wrapper, | |
$name | |||
) |
Deletes a particular setting from a context
string | $wrapper | The wrapper to use |
string | $name | The option to unset |
Définition à la ligne 981 du fichier stream.php.
JStream::eof | ( | ) |
Work out if we're at the end of the file for a stream
Définition à la ligne 368 du fichier stream.php.
Références JText\_().
JStream::filesize | ( | ) |
Retrieve the file size of the path
Définition à la ligne 414 du fichier stream.php.
Références JText\_(), et JFilesystemHelper\remotefsize().
JStream::get_meta_data | ( | ) |
Get the stream metadata
Définition à la ligne 900 du fichier stream.php.
Références JText\_().
JStream::getFileHandle | ( | ) |
Return the internal file handle
Définition à la ligne 1421 du fichier stream.php.
JStream::gets | ( | $length = 0 | ) |
Get a line from the stream source.
integer | $length | The number of bytes (optional) to read. |
Définition à la ligne 485 du fichier stream.php.
Références JText\_().
JStream::move | ( | $src, | |
$dest, | |||
$context = null , |
|||
$use_prefix = true , |
|||
$relative = false |
|||
) |
Moves a file
string | $src | The file path to move from. |
string | $dest | The file path to move to. |
resource | $context | A valid context resource (optional) created with stream_context_create. |
boolean | $use_prefix | Controls the use of a prefix (optional). |
boolean | $relative | Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped. |
Définition à la ligne 1231 du fichier stream.php.
JStream::open | ( | $filename, | |
$mode = 'r' , |
|||
$use_include_path = false , |
|||
$context = null , |
|||
$use_prefix = false , |
|||
$relative = false , |
|||
$detectprocessingmode = false |
|||
) |
Generic File Operations
Open a stream with some lazy loading smarts
string | $filename | Filename |
string | $mode | Mode string to use |
boolean | $use_include_path | Use the PHP include path |
resource | $context | Context to use when opening |
boolean | $use_prefix | Use a prefix to open the file |
boolean | $relative | Filename is a relative path (if false, strips JPATH_ROOT to make it relative) |
boolean | $detectprocessingmode | Detect the processing method for the file and use the appropriate function to handle output automatically |
Définition à la ligne 186 du fichier stream.php.
Références JText\_(), JFile\getExt(), et JFilesystemHelper\isJoomlaStream().
JStream::prependFilter | ( | $filtername, | |
$read_write = STREAM_FILTER_READ , |
|||
$params = array() |
|||
) |
Prepend a filter to the chain
string | $filtername | The key name of the filter. |
integer | $read_write | Optional. Defaults to STREAM_FILTER_READ. |
array | $params | An array of params for the stream_filter_prepend call. |
Définition à la ligne 1092 du fichier stream.php.
JStream::read | ( | $length = 0 | ) |
Read a file
Handles user space streams appropriately otherwise any read will return 8192
integer | $length | Length of data to read |
Définition à la ligne 542 du fichier stream.php.
Références JText\_().
JStream::removeFilter | ( | & | $resource, |
$byindex = false |
|||
) |
Remove a filter, either by resource (handed out from the append or prepend function) or via getting the filter list)
resource | &$resource | The resource. |
boolean | $byindex | The index of the filter. |
Définition à la ligne 1133 du fichier stream.php.
JStream::seek | ( | $offset, | |
$whence = SEEK_SET |
|||
) |
Seek the file
Note: the return value is different to that of fseek
integer | $offset | Offset to use when seeking. |
integer | $whence | Seek mode to use. |
Définition à la ligne 645 du fichier stream.php.
Références JText\_().
JStream::setContextOptions | ( | $context | ) |
Updates the context to the array
Format is the same as the options for stream_context_create
array | $context | Options to create the context with |
Définition à la ligne 945 du fichier stream.php.
JStream::tell | ( | ) |
Returns the current position of the file read/write pointer.
Définition à la ligne 698 du fichier stream.php.
Références JText\_().
JStream::upload | ( | $src, | |
$dest, | |||
$context = null , |
|||
$use_prefix = true , |
|||
$relative = false |
|||
) |
Upload a file
string | $src | The file path to copy from (usually a temp folder). |
string | $dest | The file path to copy to. |
resource | $context | A valid context resource (optional) created with stream_context_create. |
boolean | $use_prefix | Controls the use of a prefix (optional). |
boolean | $relative | Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped. |
Définition à la ligne 1331 du fichier stream.php.
Références JText\_().
JStream::write | ( | & | $string, |
$length = 0 , |
|||
$chunk = 0 |
|||
) |
File write
Whilst this function accepts a reference, the underlying fwrite will do a copy! This will roughly double the memory allocation for any write you do. Specifying chunked will get around this by only writing in specific chunk sizes. This defaults to 8192 which is a sane number to use most of the time (change the default with JStream::set('chunksize', newsize);) Note: This doesn't support gzip/bzip2 writing like reading does
string | &$string | Reference to the string to write. |
integer | $length | Length of the string to write. |
integer | $chunk | Size of chunks to write in. |
Définition à la ligne 758 du fichier stream.php.
Références JText\_().
JStream::writeFile | ( | $filename, | |
& | $buffer | ||
) |
Writes a chunk of data to a file.
string | $filename | The file name. |
string | &$buffer | The data to write to the file. |
Définition à la ligne 1356 du fichier stream.php.
|
protected |
Définition à la ligne 54 du fichier stream.php.
|
protected |
Définition à la ligne 119 du fichier stream.php.
|
protected |
Définition à la ligne 127 du fichier stream.php.
|
protected |
Définition à la ligne 46 du fichier stream.php.
|
protected |
Définition à la ligne 103 du fichier stream.php.
|
protected |
Définition à la ligne 38 du fichier stream.php.
|
protected |
Définition à la ligne 62 du fichier stream.php.
|
protected |
Définition à la ligne 111 du fichier stream.php.
|
protected |
Définition à la ligne 95 du fichier stream.php.
|
protected |
Définition à la ligne 135 du fichier stream.php.
|
protected |
Définition à la ligne 87 du fichier stream.php.
|
protected |
Définition à la ligne 78 du fichier stream.php.
|
protected |
Définition à la ligne 70 du fichier stream.php.