StaticProvider
class StaticProvider extends AdhocProvider
A static provider is useful for creating mock API implementations which manages records in-memory.
TODO Add a static provider to SyntaxConformanceTest to ensure that it's representative.
Properties
protected array | $actions | from AdhocProvider | |
protected string | $entity | from AdhocProvider | |
protected int | $version | from AdhocProvider | |
protected | $records | ||
protected | $fields |
Methods
static array
getSubscribedEvents()
No description
__construct(int $version, string $entity, array $fields, array $perms = [], array $records = [])
No description
addAction(string $name, string $perm, mixed $callback)
Register a new API.
from AdhocProvider
array
getRecords()
No description
setRecords(array $records)
No description
array
doCreate(array $apiRequest)
No description
array
doGet(array $apiRequest)
No description
array
doDelete(array $apiRequest)
No description
Details
at line 46
static array
getSubscribedEvents()
at line 69
__construct(int $version, string $entity, array $fields, array $perms = [], array $records = [])
in AdhocProvider at line 92
AdhocProvider
addAction(string $name, string $perm, mixed $callback)
Register a new API.