Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($stream, string $mode='r') | |
__toString () | |
close () | |
detach () | |
attach ($resource, string $mode='r') | |
getSize () | |
tell () | |
eof () | |
isSeekable () | |
seek ($offset, $whence=SEEK_SET) | |
rewind () | |
isWritable () | |
write ($string) | |
isReadable () | |
read ($length) | |
getContents () | |
getMetadata ($key=null) | |
Attributs protégés | |
$resource | |
$stream | |
Fonctions membres privées | |
setStream ($stream, string $mode='r') | |
isValidStreamResourceType ($resource) | |
Attributs privés | |
const | ALLOWED_STREAM_RESOURCE_TYPES = ['gd', 'stream'] |
Implementation of PSR HTTP streams
__construct | ( | $stream, | |
string | $mode = 'r' |
||
) |
string | resource | $stream | |
string | $mode | Mode with which to open stream |
Exception |
Références $mode, Stream\$stream, et Stream\setStream().
__toString | ( | ) |
{Reads all data from the stream into a string, from the beginning to end.This method MUST attempt to seek to the beginning of the stream before reading data and read the stream until the end is reached.Warning: This could attempt to load a large amount of data into memory.This method MUST NOT raise an exception in order to conform with PHP's string casting operations.
Implémente StreamInterface.
Références Stream\getContents(), Stream\isReadable(), Stream\isSeekable(), et Stream\rewind().
attach | ( | $resource, | |
string | $mode = 'r' |
||
) |
Attach a new stream/resource to the instance.
string | resource | $resource | |
string | $mode |
Exception |
Références $mode, Stream\$resource, et Stream\setStream().
close | ( | ) |
{Closes the stream and any underlying resources.
Implémente StreamInterface.
Références Stream\$resource, et Stream\detach().
detach | ( | ) |
{Separates any underlying resources from the stream.After the stream has been detached, the stream is in an unusable state.
Implémente StreamInterface.
Références Stream\$resource, et null.
Référencé par Stream\close().
eof | ( | ) |
{Returns true if the stream is at the end of the stream.
Implémente StreamInterface.
Référencé par PhpInputStream\getContents(), et PhpInputStream\read().
getContents | ( | ) |
{Returns the remaining contents in a string
Implémente StreamInterface.
Références $result, UnreadableStreamException\dueToConfiguration(), UnreadableStreamException\dueToPhpError(), et Stream\isReadable().
Référencé par PhpInputStream\__toString(), et Stream\__toString().
getMetadata | ( | $key = null | ) |
{Get stream metadata as an associative array or retrieve a specific key.The keys returned are identical to the keys returned from PHP's stream_get_meta_data() function.string $key Specific metadata to retrieve. array|mixed|null Returns an associative array if no key is provided. Returns a specific key value if a key is provided and the value is found, or null if the key is not found.}
Implémente StreamInterface.
getSize | ( | ) |
{Get the size of the stream if known.
Implémente StreamInterface.
Références null.
isReadable | ( | ) |
{Returns whether or not the stream is readable.
Implémente StreamInterface.
Références $mode.
Référencé par Stream\__toString(), Stream\getContents(), et Stream\read().
isSeekable | ( | ) |
{Returns whether or not the stream is seekable.
Implémente StreamInterface.
Référencé par Stream\__toString(), et Stream\seek().
|
private |
Determine if a resource is one of the resource types allowed to instantiate a Stream
resource | $resource | Stream resource. |
Références Stream\$resource.
Référencé par Stream\setStream().
isWritable | ( | ) |
{Returns whether or not the stream is writable.
Implémente StreamInterface.
Références $mode.
Référencé par Stream\write().
read | ( | $length | ) |
{Read data from the stream.
int | $length | Read up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes. |
Implémente StreamInterface.
Références $result, UnreadableStreamException\dueToConfiguration(), UnreadableStreamException\dueToMissingResource(), UnreadableStreamException\dueToPhpError(), et Stream\isReadable().
rewind | ( | ) |
{Seek to the beginning of the stream.If the stream is not seekable, this method will raise an exception; otherwise, it will perform a seek(0).
Implémente StreamInterface.
Références Stream\seek().
Référencé par Stream\__toString().
seek | ( | $offset, | |
$whence = SEEK_SET |
|||
) |
|
private |
Set the internal stream resource.
string | resource | $stream | String stream target or stream resource. |
string | $mode | Resource mode for stream target. |
Exception |
Références $mode, Stream\$resource, Stream\$stream, Stream\isValidStreamResourceType(), et null.
Référencé par Stream\__construct(), et Stream\attach().
tell | ( | ) |
{Returns the current position of the file read/write pointer
Implémente StreamInterface.
Références $result, UntellableStreamException\dueToMissingResource(), et UntellableStreamException\dueToPhpError().
write | ( | $string | ) |
{Write data to the stream.
string | $string | The string that is to be written. |
Implémente StreamInterface.
Références $result, UnwritableStreamException\dueToConfiguration(), UnwritableStreamException\dueToMissingResource(), UnwritableStreamException\dueToPhpError(), et Stream\isWritable().
|
protected |
Référencé par Stream\attach(), Stream\close(), Stream\detach(), Stream\isValidStreamResourceType(), et Stream\setStream().
|
protected |
Référencé par PhpInputStream\__construct(), Stream\__construct(), et Stream\setStream().
|
private |
A list of allowed stream resource types that are allowed to instantiate a Stream