JsonBuffer
class JsonBuffer extends AbstractBuffer (View source)
The JsonBuffer class.
Properties
boolean | $success | Determines whether the request was successful | from AbstractBuffer |
string | $message | The main response message | from AbstractBuffer |
int | $code | Property code. | from AbstractBuffer |
mixed | $data | The response data | from AbstractBuffer |
Methods
__construct(string $message = null, mixed $data = null, bool $success = true, int $code = 200)
Constructor
from AbstractBuffer
string
toString()
Method for sending the response in JSON format
string
getMimeType()
getMimeType
Details
in AbstractBuffer at line line 54
__construct(string $message = null, mixed $data = null, bool $success = true, int $code = 200)
Constructor
at line line 23
string
toString()
Method for sending the response in JSON format
in AbstractBuffer at line line 74
string
__toString()
__toString
at line line 33
string
getMimeType()
getMimeType
in AbstractBuffer at line line 100
boolean
getSuccess()
Method to get property Success
in AbstractBuffer at line line 112
AbstractBuffer
setSuccess(boolean $success)
Method to set property success
in AbstractBuffer at line line 124
string
getMessage()
Method to get property Message
in AbstractBuffer at line line 136
AbstractBuffer
setMessage(string $message)
Method to set property message
in AbstractBuffer at line line 148
mixed
getData()
Method to get property Data
in AbstractBuffer at line line 160
AbstractBuffer
setData(mixed $data)
Method to set property data
in AbstractBuffer at line line 172
int
getCode()
Method to get property Code
in AbstractBuffer at line line 184
AbstractBuffer
setCode(int $code)
Method to set property code