Index Documentation

BencodeHttpContent
in package
implements BencodeSerializable, HttpContent

Represents Bencoded body content for a HTTP message.

Table of Contents

Interfaces

BencodeSerializable
Provides an interface for serialising objects for bencoding in a controlled manner.
HttpContent
Represents the body content for a HTTP message.

Methods

__construct()  : mixed
__toString()  : string
bencodeSerialize()  : mixed
Gets the data that should represent this object in a Bencode structure.
encode()  : string
Encodes the content.
fromEncoded()  : BencodeHttpContent
Creates an instance from encoded content.
fromFile()  : BencodeHttpContent
Creates an instance from an encoded file.
fromRequest()  : BencodeHttpContent
Creates an instance from the raw request body.
getContent()  : mixed
Retrieves unencoded content.

Methods

__construct()

public __construct(mixed $content) : mixed
Parameters
$content : mixed

Content to be bencoded.

bencodeSerialize()

Gets the data that should represent this object in a Bencode structure.

public bencodeSerialize() : mixed
Return values
mixed

Representative data.

encode()

Encodes the content.

public encode() : string
Return values
string

Bencoded string.

getContent()

Retrieves unencoded content.

public getContent() : mixed
Return values
mixed

Content.


        
On this page

Search results