Documentation

Fetcher
in package

Fetching algorithms

Table of Contents

fieldExists()  : bool
Method returns field of the object/array
fieldExistsPlain()  : bool
Method returns field of the object/array without recursive inspection
getField()  : mixed
Method returns field of the object/array
getFieldPlain()  : mixed
Method returns field of the object/array without recursinve inspection
getFields()  : array<string|int, mixed>
Method fetches all fields from objects/arrays of an array

Methods

fieldExists()

Method returns field of the object/array

public static fieldExists(mixed &$record, string $field[, bool $recursive = true ]) : bool
Parameters
$record : mixed

Record to be analyzed

$field : string

Field name

$recursive : bool = true

Do we need recursive descending

Return values
bool

Does the field $field exists or not

fieldExistsPlain()

Method returns field of the object/array without recursive inspection

public static fieldExistsPlain(mixed &$record, string $field) : bool
Parameters
$record : mixed

Record to be analyzed

$field : string

Field name

Return values
bool

Does the field $field exists or not

getField()

Method returns field of the object/array

public static getField(mixed $record, string $field[, bool $recursive = true ]) : mixed
Parameters
$record : mixed

processing record

$field : string

field name

$recursive : bool = true

shold we search the field $field along the whole object

Return values
mixed

field value

getFieldPlain()

Method returns field of the object/array without recursinve inspection

public static getFieldPlain(mixed $record, string $field) : mixed
Parameters
$record : mixed

processing record

$field : string

field name

Return values
mixed

Field value

getFields()

Method fetches all fields from objects/arrays of an array

public static getFields(mixed $data, string $field[, bool $recursive = true ]) : array<string|int, mixed>
Parameters
$data : mixed

processing record

$field : string

field name

$recursive : bool = true

shold we search the field $field along the whole object

Tags
psalm-suppress

MixedAssignment

Return values
array<string|int, mixed>

list of fields values

Search results

    Яндекс.Метрика