PHP 클래스 nspl\ds\DefaultArray

상속: extends ArrayObject
파일 보기 프로젝트 열기: ihor/Nspl

보호된 프로퍼티들

프로퍼티 타입 설명
$default mixed | callable

공개 메소드들

메소드 설명
__construct ( mixed | callable $default, array $data = [] ) If you pass a function as default value it will be called without arguments to provide a default value for the given key, this value will be inserted in the array for the key, and returned.
__toString ( ) : string
fromArray ( mixed $default, array $array ) : static
offsetGet ( integer $index ) : mixed (PHP 5 >= 5.0.0)
Offset to retrieve

비공개 메소드들

메소드 설명
getDefault ( )

메소드 상세

__construct() 공개 메소드

If you pass a function as default value it will be called without arguments to provide a default value for the given key, this value will be inserted in the array for the key, and returned.
public __construct ( mixed | callable $default, array $data = [] )
$default mixed | callable
$data array Provides initial data

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

fromArray() 공개 정적인 메소드

public static fromArray ( mixed $default, array $array ) : static
$default mixed
$array array
리턴 static

offsetGet() 공개 메소드

(PHP 5 >= 5.0.0)
Offset to retrieve
public offsetGet ( integer $index ) : mixed
$index integer

The offset to retrieve.

리턴 mixed Can return all value types.

프로퍼티 상세

$default 보호되어 있는 프로퍼티

protected mixed|callable $default
리턴 mixed | callable