CodeIgniter v4.5 API

DotArrayFilter
in package

FinalYes
Tags
see
DotArrayFilterTest

Table of Contents

Methods

run()  : array<string|int, mixed>
Creates a new array with only the elements specified in dot array syntax.
filter()  : array<string|int, mixed>
Used by `run()` to recursively filter the array with wildcards.

Methods

run()

Creates a new array with only the elements specified in dot array syntax.

public static run(array<string|int, mixed> $indexes, array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$indexes : array<string|int, mixed>

The dot array syntax pattern to use for filtering.

$array : array<string|int, mixed>

The array to filter.

Return values
array<string|int, mixed>

The filtered array.

filter()

Used by `run()` to recursively filter the array with wildcards.

private static filter(array<string|int, mixed> $indexes, array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$indexes : array<string|int, mixed>

The dot array syntax pattern to use for filtering.

$array : array<string|int, mixed>

The array to filter.

Return values
array<string|int, mixed>

The filtered array.


        
On this page

Search results