PHP Class 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.
显示文件
Open project: oleksandr-torosh/yona-cms
Class Usage Examples
Public Methods
Method Details
__construct()
public method