PHP Класс System\arr

Just another php framework
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( $stack = [] ) Arr constructor
create ( $stack = [] ) Create a new instance of the Arr class
erase ( &$array, $key ) Remove a value from a array
first ( ) : mixed Returns the first element in the stack
get ( $array, $key, $fallback = null ) Return a element from a array
last ( ) : mixed Returns the last element in the stack
set ( &$array, $key, $value ) Sets a value in a array
shuffle ( ) : object Shuffle the array elements in the stack

Описание методов

__construct() публичный Метод

Arr constructor
public __construct ( $stack = [] )

create() публичный статический Метод

Create a new instance of the Arr class
public static create ( $stack = [] )

erase() публичный статический Метод

Remove a value from a array
public static erase ( &$array, $key )

first() публичный Метод

Returns the first element in the stack
public first ( ) : mixed
Результат mixed

get() публичный статический Метод

Return a element from a array
public static get ( $array, $key, $fallback = null )

last() публичный Метод

Returns the last element in the stack
public last ( ) : mixed
Результат mixed

set() публичный статический Метод

Sets a value in a array
public static set ( &$array, $key, $value )

shuffle() публичный Метод

Shuffle the array elements in the stack
public shuffle ( ) : object
Результат object Returns self for chaining