PHP 클래스 luya\helpers\ArrayHelper

저자: nadar
상속: extends yii\helpers\BaseArrayHelper
파일 보기 프로젝트 열기: zephir/luya 1 사용 예제들

공개 메소드들

메소드 설명
arrayUnshiftAssoc ( array &$arr, string $key, mixed $val ) : array Prepend an assoc array item as first entry for a given array.
search ( array $array, string $searchText, boolean $sensitive = false ) : array Search trough all keys inside of an array, any occurence will return the rest of the array.
toObject ( array $array ) : object Create an object from an array.
typeCast ( array $array ) : array TypeCast values from a mixed array source. numeric values will be casted as integer.

메소드 상세

arrayUnshiftAssoc() 공개 정적인 메소드

Prepend an assoc array item as first entry for a given array.
public static arrayUnshiftAssoc ( array &$arr, string $key, mixed $val ) : array
$arr array The array where the value should be prepend
$key string The new array key
$val mixed The value for the new key
리턴 array

toObject() 공개 정적인 메소드

Create an object from an array.
public static toObject ( array $array ) : object
$array array
리턴 object

typeCast() 공개 정적인 메소드

This method is often used to convert corect json respons arrays
public static typeCast ( array $array ) : array
$array array The array which should be type casted
리턴 array An array with type casted values