PHP 클래스 Api\Model\Payload

Class represents json output that is sent to clients via REST API interface. Output is standardized and consists of error message (if applicable) and custom formatted content. Example for index page: { "error": false, "content": "welcome to api." } If there was an error, the reason should be described within error property. HTTP status code is always 200, since server itself responded with no error.
파일 보기 프로젝트 열기: oleksandr-torosh/yona-cms 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $content, $error = false )
toArray ( )

메소드 상세

__construct() 공개 메소드

public __construct ( $content, $error = false )

toArray() 공개 메소드

public toArray ( )