PHP 클래스 Art4\JsonApiClient\Utils\DataContainer

상속: implements Art4\JsonApiClient\Utils\DataContainerInterface
파일 보기 프로젝트 열기: art4/json-api-client

보호된 프로퍼티들

프로퍼티 타입 설명
$allowed_keys array
$data array

공개 메소드들

메소드 설명
__construct ( array $allowed_keys = [] )
asArray ( boolean $fullArray = false ) : array Convert this object in an array
get ( mixed $key ) : mixed Get a value by a key
getKeys ( ) : array Returns the keys of all setted values
has ( mixed $key ) : boolean Check if a value exists
set ( string $key, mixed $value ) : self Set a value

보호된 메소드들

메소드 설명
getValue ( string $key ) : mixed Get a value by the key
objectTransform ( $val ) : mixed Transforms objects to arrays
parseKey ( string | AccessKey $key ) : AccessKey Parse a dot.notated.key to an object

메소드 상세

__construct() 공개 메소드

public __construct ( array $allowed_keys = [] )
$allowed_keys array Keys of allowed values

asArray() 공개 메소드

Convert this object in an array
public asArray ( boolean $fullArray = false ) : array
$fullArray boolean If true, objects are transformed into arrays recursively
리턴 array

get() 공개 메소드

Get a value by a key
public get ( mixed $key ) : mixed
$key mixed The key
리턴 mixed

getKeys() 공개 메소드

Returns the keys of all setted values
public getKeys ( ) : array
리턴 array Keys of all setted values

getValue() 보호된 메소드

Get a value by the key
protected getValue ( string $key ) : mixed
$key string The key of the value
리턴 mixed The value

has() 공개 메소드

Check if a value exists
public has ( mixed $key ) : boolean
$key mixed The key
리턴 boolean

objectTransform() 보호된 메소드

Transforms objects to arrays
protected objectTransform ( $val ) : mixed
$val
리턴 mixed

parseKey() 보호된 메소드

Parse a dot.notated.key to an object
protected parseKey ( string | AccessKey $key ) : AccessKey
$key string | AccessKey The key
리턴 AccessKey The parsed key

set() 공개 메소드

Set a value
public set ( string $key, mixed $value ) : self
$key string The Key
$value mixed The Value
리턴 self

프로퍼티 상세

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

protected array $allowed_keys
리턴 array

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

protected array $data
리턴 array