class UrlFetchStream implements IteratorAggregate, ArrayAccess (View source)

Constants

DOMAIN_SEPARATOR

NEWLINE_SEPARATOR

HTTP_METHODS

Properties

$context
$headers

Methods

iterable
getIterator()

No description

bool
offsetExists($offset)

No description

offsetGet($offset)

No description

void
offsetSet($offset, $value)

No description

void
offsetUnset($offset)

No description

bool
stream_open(string $url, string $mode, int $optionsStream, null $openedPath)

Opens URL Stream.

void
stream_close()

Closes URL Stream.

bool
stream_eof()

Return if end of file.

void
stream_stat()

Returns URL Stats, Unused.

string
stream_read(int $count)

Read from stream.

bool
stream_seek(int $offset, int $whence = SEEK_SET)

Seeks to specific location in a stream.

int
stream_tell()

Retrieve the current position of a stream.

Details

iterable getIterator()

Return Value

iterable

bool offsetExists($offset)

Parameters

$offset

Return Value

bool

offsetGet($offset)

Parameters

$offset

void offsetSet($offset, $value)

Parameters

$offset
$value

Return Value

void

void offsetUnset($offset)

Parameters

$offset

Return Value

void

bool stream_open(string $url, string $mode, int $optionsStream, null $openedPath)

Opens URL Stream.

Parameters

string $url Specifies the URL that was passed to the original function.
string $mode UNUSED in the context of URLs.
int $optionsStream UNUSED in the context of URLs.
null $openedPath UNUSED in the context of URLs.

Return Value

bool Returns true on success or false on failure.

Exceptions

Exception if URLFetch request is nto successful.

void stream_close()

Closes URL Stream.

Return Value

void

bool stream_eof()

Return if end of file.

Return Value

bool Return true if the read/write position is at the end of the stream and if no more data is available to be read, or false otherwise.

void stream_stat()

Returns URL Stats, Unused.

Must be implemented for stream wrapper.

Return Value

void

string stream_read(int $count)

Read from stream.

Parameters

int $count How many bytes of data from the current position should be returned.

Return Value

string Return number of bytes. If there are less than count bytes available, return as many as are available. If no more data is available, return either false or an empty string.

bool stream_seek(int $offset, int $whence = SEEK_SET)

Seeks to specific location in a stream.

Parameters

int $offset The stream offset to seek to.
int $whence SEEK_SET: - Set position equal to offset bytes. SEEK_CUR: - Set position to current location plus offset. SEEK_END: - Set position to end-of-file plus offset.

Return Value

bool Return true if the position was updated, false otherwise.

int stream_tell()

Retrieve the current position of a stream.

Return Value

int current position of the stream as int.