Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe CallbackStream
+ Graphe d'héritage de CallbackStream:

Fonctions membres publiques

 __construct (callable $callback)
 
 __toString ()
 
 close ()
 
 detach ()
 
 attach (callable $callback)
 
 getSize ()
 
 tell ()
 
 eof ()
 
 isSeekable ()
 
 seek ($offset, $whence=SEEK_SET)
 
 rewind ()
 
 isWritable ()
 
 write ($string)
 
 isReadable ()
 
 read ($length)
 
 getContents ()
 
 getMetadata ($key=null)
 

Attributs protégés

 $callback
 

Description détaillée

Implementation of PSR HTTP streams

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( callable  $callback)
Paramètres
callable$callback
Exceptions
Exception

Références CallbackStream\attach().

Documentation des fonctions membres

◆ __toString()

__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.

Voir également
http://php.net/manual/en/language.oop5.magic.php#object.tostring
Renvoie
string
}

Implémente StreamInterface.

Références CallbackStream\getContents().

◆ attach()

attach ( callable  $callback)

Attach a new callback to the instance.

Références CallbackStream\$callback.

Référencé par CallbackStream\__construct().

◆ close()

close ( )

{Closes the stream and any underlying resources.

Renvoie
void
}

Implémente StreamInterface.

Références null.

◆ detach()

detach ( )

{Separates any underlying resources from the stream.After the stream has been detached, the stream is in an unusable state.

Renvoie
resource|null Underlying PHP stream, if any
}

Implémente StreamInterface.

Références CallbackStream\$callback, et null.

Référencé par CallbackStream\getContents().

◆ eof()

eof ( )

{Returns true if the stream is at the end of the stream.

Renvoie
bool
}

Implémente StreamInterface.

Référencé par CallbackStream\getMetadata().

◆ getContents()

getContents ( )

{Returns the remaining contents in a string

Renvoie
string
Exceptions
}

Implémente StreamInterface.

Références CallbackStream\$callback, et CallbackStream\detach().

Référencé par CallbackStream\__toString().

◆ getMetadata()

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.

Références $key, CallbackStream\eof(), false, et null.

◆ getSize()

getSize ( )

{Get the size of the stream if known.

Renvoie
int|null Returns the size in bytes if known, or null if unknown.
}

Implémente StreamInterface.

Références null.

◆ isReadable()

isReadable ( )

{Returns whether or not the stream is readable.

Renvoie
bool
}

Implémente StreamInterface.

◆ isSeekable()

isSeekable ( )

{Returns whether or not the stream is seekable.

Renvoie
bool
}

Implémente StreamInterface.

◆ isWritable()

isWritable ( )

{Returns whether or not the stream is writable.

Renvoie
bool
}

Implémente StreamInterface.

◆ read()

read (   $length)

{Read data from the stream.

Paramètres
int$lengthRead up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes.
Renvoie
string Returns the data read from the stream, or an empty string if no bytes are available.
Exceptions
}

Implémente StreamInterface.

Références UnreadableStreamException\forCallbackStream().

◆ rewind()

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).

Voir également
seek() on failure.
}

Implémente StreamInterface.

Références UnrewindableStreamException\forCallbackStream().

◆ seek()

◆ tell()

tell ( )

{Returns the current position of the file read/write pointer

Renvoie
int Position of the file pointer
Exceptions
}

Implémente StreamInterface.

Références UntellableStreamException\forCallbackStream().

◆ write()

write (   $string)

{Write data to the stream.

Paramètres
string$stringThe string that is to be written.
Renvoie
int Returns the number of bytes written to the stream.
Exceptions
}

Implémente StreamInterface.

Références UnwritableStreamException\forCallbackStream().

Documentation des champs

◆ $callback


La documentation de cette classe a été générée à partir du fichier suivant :