Dotclear 2.24
Loading...
Searching...
No Matches
dcRestServer Class Reference
Inheritance diagram for dcRestServer:
restServer

Public Member Functions

 __construct ()
 
 serve (string $encoding='UTF-8')
 
- Public Member Functions inherited from restServer
 __construct ()
 
 addFunction (string $name, $callback)
 
 serve (string $encoding='UTF-8')
 

Data Fields

 $json
 
- Data Fields inherited from restServer
 $rsp
 
 $functions = []
 

Protected Member Functions

 callFunction (string $name, array $get, array $post)
 
 callMethod (string $name, array $get, array $post)
 
 callFunction (string $name, array $get, array $post)
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructs a new instance.

Reimplemented from restServer.

Member Function Documentation

◆ callFunction()

callFunction ( string  $name,
array  $get,
array  $post 
)
protected

Rest method call (XML form).

Parameters
string$nameThe method name
array$getThe GET parameters copy
array$postThe POST parameters copy
Returns
mixed Rest method result

Reimplemented from restServer.

References dcCore\app().

◆ callMethod()

callMethod ( string  $name,
array  $get,
array  $post 
)
protected

Rest method call (JSON form).

Parameters
string$nameThe method name
array$getThe GET parameters copy
array$postThe POST parameters copy
Returns
mixed Rest method result

Referenced by serve().

◆ serve()

serve ( string  $encoding = 'UTF-8')

Main server

This method creates the main server.

Parameters
string$encodingServer charset

Reimplemented from restServer.

References callMethod().

Field Documentation

◆ $json

$json

The documentation for this class was generated from the following file: