class JRegistryFormatJSON extends JRegistryFormat


Located at : UKNOWVA_ROOT/libraries/joomla/registry/format/json.php

JSON format handler for JRegistry.

Methods

static object
getInstance(string $type)

Returns a reference to a Format object, only creating it if it doesn't already exist.

string
objectToString(object $object, array $options = array())

Converts an object into a JSON formatted string.

object
stringToObject(string $data, array $options = array('processSections' => false))

Parse a JSON formatted string and convert it into an object.

Details

in JRegistryFormat at line 32
static object getInstance(string $type)

Returns a reference to a Format object, only creating it if it doesn't already exist.

Parameters

string $type The format to load

Return Value

object Registry format handler

Exceptions

JException

at line 31
string objectToString(object $object, array $options = array())

Converts an object into a JSON formatted string.

Parameters

object $object Data Source Object.
array $options An array of options for the formatter.

Return Value

string Formatted string.

at line 48
object stringToObject(string $data, array $options = array('processSections' => false))

Parse a JSON formatted string and convert it into an object.

If the string is not in JSON format, this method will attempt to parse it as INI format.

Parameters

string $data Formatted string
array $options An array of options for the formatter.

Return Value

object Data Object