Apix\Server¶
- class Apix\Server¶
- onCreate()¶
POST request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onRead()¶
GET request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onUpdate()¶
PUT request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onModify()¶
PATCH request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onDelete()¶
DELETE request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onHelp()¶
OPTIONS request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- onTest()¶
HEAD request handler
Parameters: - $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response when matched.
See: Server::proxy
Returns: Controller $rovides a fluent interface.
- proxy()¶
Acts as a shortcut to resources::add.
when matched.See: Resources::add
Parameters: - $method (string) – The HTTP method to match against.
- $path (string) – The path name to match against.
- $to (mixed) – Callback that returns the response
Returns: Controller
- setGroup()¶
Test Read from a group (TODO).
Parameters: - $opts (array) – Options are:
Returns: string