Documentation

Context
in package

Class \Hoa\Stream\Context.

Make a multiton of stream contexts.

Tags
copyright

Copyright © 2007-2017 Hoa community

license

New BSD License

Table of Contents

Properties

$_id  : string
Context ID.
$_instances  : array<string|int, mixed>
Multiton.

Methods

contextExists()  : bool
Check if a context exists.
getContext()  : resource
Get context as a resource.
getId()  : string
Get context ID.
getInstance()  : Context
Multiton.
getOptions()  : array<string|int, mixed>
Get options.
getParameters()  : array<string|int, mixed>
Get parameters.
setOptions()  : bool
Set options.
setParameters()  : bool
Set parameters.
__construct()  : mixed
Construct a context.

Properties

$_id

Context ID.

protected string $_id = null

$_instances

Multiton.

protected static array<string|int, mixed> $_instances = []

Methods

contextExists()

Check if a context exists.

public static contextExists(string $id) : bool
Parameters
$id : string

ID.

Return values
bool

getContext()

Get context as a resource.

public getContext() : resource
Return values
resource

getId()

Get context ID.

public getId() : string
Return values
string

getOptions()

Get options.

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getParameters()

Get parameters.

public getParameters() : array<string|int, mixed>

.

Return values
array<string|int, mixed>

setOptions()

Set options.

public setOptions(array<string|int, mixed> $options) : bool

Please, see http://php.net/context.

Parameters
$options : array<string|int, mixed>

Options.

Return values
bool

setParameters()

Set parameters.

public setParameters(array<string|int, mixed> $parameters) : bool

Please, see http://php.net/context.params.

Parameters
$parameters : array<string|int, mixed>

Parameters.

Return values
bool

__construct()

Construct a context.

protected __construct(mixed $id) : mixed
Parameters
$id : mixed

        
On this page

Search results