HumHub Documentation (unofficial)

JSONPath
in package
implements ArrayAccess, Iterator, JsonSerializable, Countable

Table of Contents

Interfaces

ArrayAccess
Iterator
JsonSerializable
Countable

Constants

ALLOW_MAGIC  = true

Properties

$data  : array<string|int, mixed>
$options  : bool
$tokenCache  : array<string|int, mixed>

Methods

__construct()  : mixed
__get()  : mixed|null
count()  : int
current()  : mixed
data()  : array<string|int, mixed>
find()  : static
Evaluate an expression
first()  : mixed|null
firstKey()  : mixed|null
Evaluate an expression and return the first key
getData()  : array<string|int, mixed>
jsonSerialize()  : array<string|int, mixed>
key()  : mixed
last()  : mixed|null
Evaluate an expression and return the last result
lastKey()  : mixed|null
Evaluate an expression and return the last key
next()  : void
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
parseTokens()  : array<string|int, mixed>
rewind()  : void
valid()  : bool

Constants

ALLOW_MAGIC

public mixed ALLOW_MAGIC = true

Properties

$data

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

$options

protected bool $options = false

$tokenCache

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

Methods

__construct()

public final __construct([array<string|int, mixed>|ArrayAccess $data = [] ][, bool $options = false ]) : mixed
Parameters
$data : array<string|int, mixed>|ArrayAccess = []
$options : bool = false

__get()

public __get(mixed $key) : mixed|null
Parameters
$key : mixed
Tags
noinspection

MagicMethodsValidityInspection

Return values
mixed|null

count()

public count() : int
Tags
inheritDoc
Return values
int

current()

public current() : mixed
Tags
inheritDoc

data()

public data() : array<string|int, mixed>
Tags
deprecated

Please use getData() instead

Return values
array<string|int, mixed>

find()

Evaluate an expression

public find(string $expression) : static
Parameters
$expression : string
Tags
throws
JSONPathException
Return values
static

first()

public first() : mixed|null
Return values
mixed|null

firstKey()

Evaluate an expression and return the first key

public firstKey() : mixed|null
Return values
mixed|null

getData()

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

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

key()

public key() : mixed
Tags
inheritDoc

last()

Evaluate an expression and return the last result

public last() : mixed|null
Return values
mixed|null

lastKey()

Evaluate an expression and return the last key

public lastKey() : mixed|null
Return values
mixed|null

next()

public next() : void
Tags
inheritDoc

offsetExists()

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

offsetGet()

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

offsetSet()

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

offsetUnset()

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

parseTokens()

public parseTokens(string $expression) : array<string|int, mixed>
Parameters
$expression : string
Tags
throws
JSONPathException
Return values
array<string|int, mixed>

rewind()

public rewind() : void
Tags
inheritDoc

valid()

public valid() : bool
Tags
inheritDoc
Return values
bool

        
On this page

Search results