Document
└─JSONDocument
public class JSONDocument
extends Document
Constructor Summary | |
---|---|
void | __construct(RESTClient client, string uri) Create a JSON document object. |
Method Summary | |
---|---|
string | read(string uri, array params) Read a JSON document from the database. |
Document | write(string uri, array params) Write a JSON document to the database. |
boolean | isValidJSON(mixed json) Check if JSON content is valid. |
Object | Get the document as a PHP object. |
array | Get the document as a PHP associative array. |
Methods inherited from MLPHP\Document | |
---|---|
__construct, delete, deleteMetadata, getConnection, getContent, getContentType, getFileMimeType, getResponse, getURI, hasContent, read, readMetadata, setConnection, setContent, setContentFile, setContentType, setURI, write, writeMetadata |
public void __construct(RESTClient client, string uri)
Create a JSON document object.
public string read(string uri, array params)
Read a JSON document from the database.
public Document write(string uri, array params)
Write a JSON document to the database.
public boolean isValidJSON(mixed json)
Check if JSON content is valid.
public Object getAsObject()
Get the document as a PHP object.
public array getAsArray()
Get the document as a PHP associative array.
Represents a JSON document.