phpbotgram

AttrDict
in package
implements ArrayAccess, Countable, IteratorAggregate

FinalYes

Hybrid dict / object that lets `MagicFilter` resolve both `F->foo` (the attribute path) and `F[foo]` (the subscript path) against a single value.

Port of upstream magic_filter.attrdict.AttrDict (magic_filter/attrdict.py). Used by the MagicData filter to wrap the dispatcher's middleware-data dict so a MagicFilter rule can transparently walk either F->event_chat or F['event_chat'].

Tags
implements

Table of Contents

Interfaces

ArrayAccess
Countable
IteratorAggregate

Properties

$data  : array<string|int, mixed>

Methods

__construct()  : mixed
__get()  : mixed
__isset()  : bool
__set()  : void
__unset()  : void
count()  : int
getIterator()  : Traversable
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
toArray()  : array<string|int, mixed>

Properties

$data

private array<string|int, mixed> $data

Methods

__construct()

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

__get()

public __get(string $name) : mixed
Parameters
$name : string

__isset()

public __isset(string $name) : bool
Parameters
$name : string
Return values
bool

__set()

public __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

__unset()

public __unset(string $name) : void
Parameters
$name : string

count()

public count() : int
Return values
int

getIterator()

public getIterator() : Traversable
Return values
Traversable

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
On this page

Search results