PHP 인터페이스 RESTfulAPI_Serializer

저자: Thierry Francois @colymba [email protected]
파일 보기 프로젝트 열기: colymba/silverstripe-restfulapi 0 사용 예제들

공개 메소드들

메소드 설명
formatName ( string $name ) : string Format a SilverStripe ClassName of DBField to be used by the client API
getcontentType ( ) : string Return Content-type header definition to be used in the API response
serialize ( DataObject | DataList | Array $data ) : string Convert raw data (DataObject, DataList or Array) to JSON ready to be consumed by the client API

메소드 상세

formatName() 공개 메소드

Format a SilverStripe ClassName of DBField to be used by the client API
public formatName ( string $name ) : string
$name string ClassName of DBField name
리턴 string Formatted name

getcontentType() 공개 메소드

Return Content-type header definition to be used in the API response
public getcontentType ( ) : string
리턴 string Content-type

serialize() 공개 메소드

Convert raw data (DataObject, DataList or Array) to JSON ready to be consumed by the client API
public serialize ( DataObject | DataList | Array $data ) : string
$data DataObject | DataList | Array data to serialize
리턴 string JSON representation of data