Open Journal Systems  3.3.0
Guzzle\Stream\StreamInterface Interface Reference
Inheritance diagram for Guzzle\Stream\StreamInterface:
Guzzle\Http\EntityBodyInterface Guzzle\Stream\Stream Guzzle\Http\AbstractEntityBodyDecorator Guzzle\Http\EntityBody Guzzle\Http\EntityBody Guzzle\Http\CachingEntityBody Guzzle\Http\IoEmittingEntityBody Guzzle\Http\ReadLimitEntityBody

Public Member Functions

 __toString ()
 
 close ()
 
 detachStream ()
 
 feof ()
 
 ftell ()
 
 getCustomData ($key)
 
 getMetaData ($key=null)
 
 getSize ()
 
 getStream ()
 
 getStreamType ()
 
 getUri ()
 
 getWrapper ()
 
 getWrapperData ()
 
 isConsumed ()
 
 isLocal ()
 
 isReadable ()
 
 isRepeatable ()
 
 isSeekable ()
 
 isWritable ()
 
 read ($length)
 
 readLine ($maxLength=null)
 
 rewind ()
 
 seek ($offset, $whence=SEEK_SET)
 
 setCustomData ($key, $value)
 
 setSize ($size)
 
 setStream ($stream, $size=null)
 
 write ($string)
 

Detailed Description

OO interface to PHP streams

Definition at line 8 of file lib/vendor/guzzle/guzzle/src/Guzzle/Stream/StreamInterface.php.

Member Function Documentation

◆ __toString()

Guzzle\Stream\StreamInterface::__toString ( )

Convert the stream to a string if the stream is readable and the stream is seekable.

Returns
string

Implemented in Guzzle\Stream\Stream, Guzzle\Http\CachingEntityBody, Guzzle\Http\ReadLimitEntityBody, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ close()

Guzzle\Stream\StreamInterface::close ( )

◆ detachStream()

Guzzle\Stream\StreamInterface::detachStream ( )

Detach the current stream resource

Returns
self

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ feof()

Guzzle\Stream\StreamInterface::feof ( )

Alias of isConsumed

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ ftell()

Guzzle\Stream\StreamInterface::ftell ( )

Returns the current position of the file read/write pointer

Returns
int|bool Returns the position of the file pointer or false on error

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getCustomData()

Guzzle\Stream\StreamInterface::getCustomData (   $key)

Get custom data from the stream

Parameters
string$keyKey to retrieve
Returns
null|mixed

Implemented in Guzzle\Stream\Stream, Guzzle\Http\CachingEntityBody, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getMetaData()

Guzzle\Stream\StreamInterface::getMetaData (   $key = null)

Get stream metadata

Parameters
string$keySpecific metadata to retrieve
Returns
array|mixed|null

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getSize()

Guzzle\Stream\StreamInterface::getSize ( )

◆ getStream()

Guzzle\Stream\StreamInterface::getStream ( )

Get the stream resource

Returns
resource

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getStreamType()

Guzzle\Stream\StreamInterface::getStreamType ( )

Get a label describing the underlying implementation of the stream

Returns
string

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getUri()

Guzzle\Stream\StreamInterface::getUri ( )

Get the URI/filename associated with this stream

Returns
string

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getWrapper()

Guzzle\Stream\StreamInterface::getWrapper ( )

Get the stream wrapper type

Returns
string

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ getWrapperData()

Guzzle\Stream\StreamInterface::getWrapperData ( )

Wrapper specific data attached to this stream.

Returns
array

Implemented in Guzzle\Http\CachingEntityBody, Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ isConsumed()

Guzzle\Stream\StreamInterface::isConsumed ( )

◆ isLocal()

Guzzle\Stream\StreamInterface::isLocal ( )

Check if the stream is a local stream vs a remote stream

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ isReadable()

Guzzle\Stream\StreamInterface::isReadable ( )

Check if the stream is readable

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ isRepeatable()

Guzzle\Stream\StreamInterface::isRepeatable ( )

Check if the stream is repeatable

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ isSeekable()

Guzzle\Stream\StreamInterface::isSeekable ( )

Check if the string is repeatable

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ isWritable()

Guzzle\Stream\StreamInterface::isWritable ( )

Check if the stream is writable

Returns
bool

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ read()

Guzzle\Stream\StreamInterface::read (   $length)

Read data from the stream

Parameters
int$lengthUp to length number of bytes read.
Returns
string|bool Returns the data read from the stream or FALSE on failure or EOF

Implemented in Guzzle\Stream\Stream, Guzzle\Http\AbstractEntityBodyDecorator, Guzzle\Http\ReadLimitEntityBody, Guzzle\Http\CachingEntityBody, and Guzzle\Http\IoEmittingEntityBody.

◆ readLine()

Guzzle\Stream\StreamInterface::readLine (   $maxLength = null)

Read a line from the stream up to the maximum allowed buffer length

Parameters
int$maxLengthMaximum buffer length
Returns
string|bool

Implemented in Guzzle\Stream\Stream, Guzzle\Http\AbstractEntityBodyDecorator, and Guzzle\Http\CachingEntityBody.

◆ rewind()

Guzzle\Stream\StreamInterface::rewind ( )

Rewind to the beginning of the stream

Returns
bool Returns true on success or false on failure

Implemented in Guzzle\Stream\Stream, Guzzle\Http\CachingEntityBody, Guzzle\Http\EntityBody, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ seek()

Guzzle\Stream\StreamInterface::seek (   $offset,
  $whence = SEEK_SET 
)

Seek to a position in the stream

Parameters
int$offsetStream offset
int$whenceWhere the offset is applied
Returns
bool Returns TRUE on success or FALSE on failure http://www.php.net/manual/en/function.fseek.php

Implemented in Guzzle\Stream\Stream, Guzzle\Http\AbstractEntityBodyDecorator, Guzzle\Http\ReadLimitEntityBody, and Guzzle\Http\CachingEntityBody.

◆ setCustomData()

Guzzle\Stream\StreamInterface::setCustomData (   $key,
  $value 
)

Set custom data on the stream

Parameters
string$keyKey to set
mixed$valueValue to set
Returns
self

Implemented in Guzzle\Stream\Stream, Guzzle\Http\CachingEntityBody, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ setSize()

Guzzle\Stream\StreamInterface::setSize (   $size)

Specify the size of the stream in bytes

Parameters
int$sizeSize of the stream contents in bytes
Returns
self

Implemented in Guzzle\Stream\Stream, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ setStream()

Guzzle\Stream\StreamInterface::setStream (   $stream,
  $size = null 
)

Set the stream that is wrapped by the object

Parameters
resource$streamStream resource to wrap
int$sizeSize of the stream in bytes. Only pass if the size cannot be obtained from the stream.
Returns
self

Implemented in Guzzle\Stream\Stream, Guzzle\Http\CachingEntityBody, and Guzzle\Http\AbstractEntityBodyDecorator.

◆ write()

Guzzle\Stream\StreamInterface::write (   $string)

Write data to the stream

Parameters
string$stringThe string that is to be written.
Returns
int|bool Returns the number of bytes written to the stream on success or FALSE on failure.

Implemented in Guzzle\Stream\Stream, Guzzle\Http\AbstractEntityBodyDecorator, Guzzle\Http\CachingEntityBody, and Guzzle\Http\IoEmittingEntityBody.


The documentation for this interface was generated from the following file: