| Fully Qualified Name: | CodeIgniter\RESTful\ResourceController |
| Extends: | Controller |
An extendable controller to provide a RESTful API for a resource.
| Name | Description | Defined By |
|---|---|---|
| create() | Create a new resource object, from "posted" parameters | ResourceController |
| delete() | Delete the designated resource object from the model | ResourceController |
| edit() | Return the editable properties of a resource object | ResourceController |
| index() | Return an array of resource objects, themselves in array format | ResourceController |
| initController() | ResourceController | |
| new() | Return a new resource object, with default properties | ResourceController |
| setFormat() | Set/change the expected response representation for returned objects | ResourceController |
| setModel() | Set or change the model this controller is bound to. | ResourceController |
| show() | Return the properties of a resource object | ResourceController |
| update() | Add or update a model resource, from "posted" properties | ResourceController |
Create a new resource object, from "posted" parameters
Returns: array an array
Delete the designated resource object from the model
| Parameter Name | Type | Description |
|---|---|---|
| $id |
Returns: array an array
Return the editable properties of a resource object
| Parameter Name | Type | Description |
|---|---|---|
| $id |
Returns: array an array
Return an array of resource objects, themselves in array format
Returns: array an array
| Parameter Name | Type | Description |
|---|---|---|
| $request | ||
| $response | ||
| $logger |
Returns: void
Return a new resource object, with default properties
Returns: array an array
Set/change the expected response representation for returned objects
| Parameter Name | Type | Description |
|---|---|---|
| $format | string |
Returns:
Set or change the model this controller is bound to.
Given either the name or the object, determine the other.
| Parameter Name | Type | Description |
|---|---|---|
| $which | string|object |
Returns:
Return the properties of a resource object
| Parameter Name | Type | Description |
|---|---|---|
| $id |
Returns: array an array
Add or update a model resource, from "posted" properties
| Parameter Name | Type | Description |
|---|---|---|
| $id |
Returns: array an array