|
- Note
- These methods are not public API and they are likely to be changed.
|
static | loadConfig ($base_dir) |
| Load configuration from three files (defaults, app, local) and merge it.
|
|
static | createSmalldb ($config) |
| Create and initialize Smalldb, including Flupdo and Auth objects.
|
|
static | createRouter ($config, $handler) |
| Create API handler.
|
|
static | createHandler ($config, $smalldb) |
| Create handler, which processes all API requests from router.
|
|
static | renderStateMachine (\Smalldb::StateMachine::AbstractBackend $smalldb, $machine, $format) |
| Render state diagram.
|
|
The REST API application.
Simply call Application::main(__DIR__)
and it should work.
- Parameters
-
$base_dir | Base directory, where config.app.json.php is located. |
$task | Select what this PHP script shall do – see TASK_* constants. |
- Note
- This class is a bit ugly to allow use of various parts from tests. The only real public API is the main() method.