|
Smalldb-REST
v0.5
|
The REST API application.
Simply call Application::main(__DIR__) and it should work.
| $base_dir | Base directory, where config.app.json.php is located. |
| $task | Select what this PHP script shall do – see TASK_* constants. |
Static Public Member Functions | |
| static | main ($base_dir, $task=self::TASK_API) |
| The main() More... | |
| static | renderStateMachine (\Smalldb::StateMachine::AbstractBackend $smalldb, $machine, $format) |
| Render state diagram. More... | |
| static | performSelfCheck (\Smalldb::StateMachine::AbstractBackend $smalldb) |
| Perform self-check. More... | |
Public Attributes | |
| const | TASK_API = 'api' |
| Implement Smalldb JSON REST API. More... | |
| const | TASK_DIAGRAM = 'diagram' |
| State diagram renderer ($_GET params: machine, format (dot, png, pdf, svg)) More... | |
| const | TASK_SELFCHECK = 'selfcheck' |
| Perform a quick self-check to detect most common errors. More... | |
Helper methods | |
| |
| static | loadConfig ($base_dir) |
| Load configuration from three files (defaults, app, local) and merge it. More... | |
| static | createSmalldb ($config) |
| Create and initialize Smalldb, including Flupdo and Auth objects. More... | |
| static | createRouter ($config, $handler) |
| Create API handler. More... | |
| static | createHandler ($config, $smalldb) |
| Create handler, which processes all API requests from router. More... | |
|
static |
|
static |
Load configuration from three files (defaults, app, local) and merge it.
|
static |
Create and initialize Smalldb, including Flupdo and Auth objects.
|
static |
Create API handler.
|
static |
Create handler, which processes all API requests from router.
|
static |
Render state diagram.
|
static |
Perform self-check.
| const TASK_API = 'api' |
Implement Smalldb JSON REST API.
| const TASK_DIAGRAM = 'diagram' |
State diagram renderer ($_GET params: machine, format (dot, png, pdf, svg))
| const TASK_SELFCHECK = 'selfcheck' |
Perform a quick self-check to detect most common errors.
1.8.11