Documentation

SelectUtil
in package

Table of Contents

Methods

getMatchingFields()  : array<string|int, mixed>
Filters a list of fieldnames by matching a pattern which may contain * wildcards.
isFieldSelected()  : bool
Checks if a field is in the Select array or matches a wildcard pattern in the Select array

Methods

getMatchingFields()

Filters a list of fieldnames by matching a pattern which may contain * wildcards.

public static getMatchingFields(string $pattern, array<string|int, mixed> $fieldNames) : array<string|int, mixed>

For fieldnames joined with a dot (e.g. email.contact_id), wildcards are only allowed after the last dot.

Parameters
$pattern : string
$fieldNames : array<string|int, mixed>
Return values
array<string|int, mixed>

isFieldSelected()

Checks if a field is in the Select array or matches a wildcard pattern in the Select array

public static isFieldSelected(string $field, array<string|int, mixed> $selects) : bool
Parameters
$field : string
$selects : array<string|int, mixed>
Return values
bool

        
On this page

Search results