RESTfulController
in package
Table of Contents
Properties
- $registeredApis : mixed
Methods
- dumpDefinition() : mixed
- Dumps the definition of all RESTful API methods of all declared RESTfulControllers
- get() : array<string|int, array<string|int, string|bool|null>>
- Returns all RESTful API methods of the class
- getAll() : array<string|int, mixed>
- Returns all RESTful API methods of all declared RESTfulControllers
- getDeclaredControllers() : array<string|int, string>
- Returns all classes that are declared and are a subclass of RESTfulController
- getRegisteredMethod() : mixed
- Returns the API method by request method and alias
- register() : void
- Registers all RESTful API methods of the class
- registerAll() : void
- Registers all RESTful API methods of all declared RESTfulControllers
- request() : mixed
- Calls the API method by alias
Properties
$registeredApis
public
static mixed
$registeredApis
Methods
dumpDefinition()
Dumps the definition of all RESTful API methods of all declared RESTfulControllers
public
static dumpDefinition(IContentFormatter $contentFormatter) : mixed
Parameters
- $contentFormatter : IContentFormatter
get()
Returns all RESTful API methods of the class
public
get() : array<string|int, array<string|int, string|bool|null>>
Return values
array<string|int, array<string|int, string|bool|null>>getAll()
Returns all RESTful API methods of all declared RESTfulControllers
public
static getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>getDeclaredControllers()
Returns all classes that are declared and are a subclass of RESTfulController
public
static getDeclaredControllers() : array<string|int, string>
Return values
array<string|int, string>getRegisteredMethod()
Returns the API method by request method and alias
public
static getRegisteredMethod(mixed $version, mixed $requestMethod, mixed $alias) : mixed
Parameters
- $version : mixed
- $requestMethod : mixed
-
The request method (GET, POST, PUT, DELETE)
- $alias : mixed
-
The alias of the API
register()
Registers all RESTful API methods of the class
public
register() : void
registerAll()
Registers all RESTful API methods of all declared RESTfulControllers
public
static registerAll() : void
request()
Calls the API method by alias
public
static request(mixed $version, mixed $alias, mixed $payload) : mixed
Parameters
- $version : mixed
- $alias : mixed
-
The alias of the API
- $payload : mixed