JSON Interface to Contrexx Doctrine Database

api
copyright Comvation AG
author Florian Schuetz
author Michael Ritter
package contrexx
subpackage core_json

 Methods

Constructor, loads adapter classes

__construct() 

addAdapter()

addAdapter($className, $namespace) 
Static

Parameters

$className

$namespace

Passes JSON data to the particular adapter and returns the result Called from jsondata() or any part of Contrexx

data(String $adapter, String $method, Array $arguments) : String
author Michael Ritter

Parameters

$adapter

String

Adapter name

$method

String

Method name

$arguments

Array

Arguments to pass

Returns

Stringdata to use for further processing

Returns the JSON code for a error message

getErrorData(String $message) : String
author Michael Ritter

Parameters

$message

String

HTML encoded message

Returns

StringJSON code

Parses data into JSON

json(array $data, boolean $setContentType) : String

Parameters

$data

array

Data to JSONify

$setContentType

boolean

(optional) If true (NOT default) the content type is set to application/json

Returns

StringJSON data to return to client

Passes JSON data to the particular adapter and returns the result Called from index.php when section is 'jsondata'

jsondata(String $adapter, String $method, Array $arguments, boolean $setContentType) : String
author Florian Schuetz
author Michael Ritter

Parameters

$adapter

String

Adapter name

$method

String

Method name

$arguments

Array

Arguments to pass

$setContentType

boolean

(optional) If true (default) the content type is set to application/json

Returns

StringJSON data to return to client

Adds an adapter accessable by JSON requests.

loadAdapter(string $className, string $namespace) 

Either specify a fully qualified classname, or a classname and the containing namespace separatly

Parameters

$className

string

Fully qualified or class name located in $namespace

$namespace

string

(optional) Namespace for non fully qualified class name

 Properties

 

$adapter_classes : array
deprecated Use component framework instead (SystemComponentController->getControllersAccessableByJson())
 

$adapters : Array
© Copyright 2013 by Comvation AG
Generated on 2013-09-23T04:45:51-07:00.