PHP 클래스 RESTfulAPI_EmberDataDeSerializer

. JSON serialization and de-serialization
저자: Thierry Francois @colymba [email protected]
상속: implements RESTfulAPI_DeSerializer
파일 보기 프로젝트 열기: colymba/silverstripe-restfulapi

공개 메소드들

메소드 설명
deserialize ( $json ) : array | false Convert client JSON data to an array of data ready to be consumed by SilverStripe
unformatName ( string $name ) : string Format a ClassName or Field name sent by client API to be used by SilverStripe

보호된 메소드들

메소드 설명
unformatPayloadData ( array $data ) : array Process payload data from client and unformats columns/values recursively

비공개 메소드들

메소드 설명
deserializeColumnName ( string $name ) : string Format a DB Column name or Field name sent from client API to be used by SilverStripe

메소드 상세

deserialize() 공개 메소드

Expects payload to be formatted: { "className": { "fieldName": "Field value", "relations": [1] } }
public deserialize ( $json ) : array | false
리턴 array | false Formatted array representation of the JSON data or false if failed

unformatName() 공개 메소드

Format a ClassName or Field name sent by client API to be used by SilverStripe
public unformatName ( string $name ) : string
$name string ClassName of Field name
리턴 string Formatted name

unformatPayloadData() 보호된 메소드

Process payload data from client and unformats columns/values recursively
protected unformatPayloadData ( array $data ) : array
$data array Payload data (decoded JSON)
리턴 array Paylaod data with all keys/values unformatted