PHP 클래스 N98\Util\ArrayFunctions

파일 보기 프로젝트 열기: netz98/n98-magerun 1 사용 예제들

공개 메소드들

메소드 설명
columnOrder ( array $columns, array $array ) : array order array entries (named and numbered) of array by the columns given as string keys.
columnOrderArrayTable ( array $columns, array $table ) : array
matrixFilterByValue ( array $matrix, string $key, mixed $value ) : array
matrixFilterStartswith ( array $matrix, string $key, string $value ) : array
mergeArrays ( array $a, array $b ) : array Merge two arrays together.

비공개 메소드들

메소드 설명
matrixCallbackFilter ( array $matrix, callable $callback ) : array

메소드 상세

columnOrder() 공개 정적인 메소드

non-existent columns default to numbered entries or if no numbered entries exists any longer, to null. entries in array that could not consume any column are put after the columns.
public static columnOrder ( array $columns, array $array ) : array
$columns array
$array array
리턴 array

columnOrderArrayTable() 공개 정적인 메소드

public static columnOrderArrayTable ( array $columns, array $table ) : array
$columns array
$table array
리턴 array table with ordered columns

matrixFilterByValue() 공개 정적인 메소드

public static matrixFilterByValue ( array $matrix, string $key, mixed $value ) : array
$matrix array
$key string key to filter
$value mixed to compare against (strict comparison)
리턴 array

matrixFilterStartswith() 공개 정적인 메소드

public static matrixFilterStartswith ( array $matrix, string $key, string $value ) : array
$matrix array
$key string to filter
$value string to compare against
리턴 array

mergeArrays() 공개 정적인 메소드

If an integer key exists in both arrays, the value from the second array will be appended the the first array. If both values are arrays, they are merged together, else the value of the second array overwrites the one of the first array.
또한 보기: http://packages.zendframework.com/docs/latest/manual/en/index.html#zend-stdlib
public static mergeArrays ( array $a, array $b ) : array
$a array
$b array
리턴 array