Attribute extends Controller
Manages model attributes.
Table of Contents
- $routes : array<string|int, mixed>
- Controller routes.
- __construct() : mixed
- Class constructor.
- get_form() : WP_Rest_Response
- Gets form.
- get_meta_box() : WP_Rest_Response
- Gets meta box.
- get_routes() : array<string|int, mixed>
- Gets controller routes.
- boot() : mixed
- Bootstraps controller properties.
- set_property() : mixed
- Sets a property value.
Properties
$routes
Controller routes.
protected
array<string|int, mixed>
$routes
= []
Methods
__construct()
Class constructor.
public
__construct([array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $args : array<string|int, mixed> = []
-
Controller arguments.
Return values
mixed —get_form()
Gets form.
public
get_form(WP_REST_Request $request) : WP_Rest_Response
Parameters
- $request : WP_REST_Request
-
API request.
Return values
WP_Rest_Response —get_meta_box()
Gets meta box.
public
get_meta_box(WP_REST_Request $request) : WP_Rest_Response
Parameters
- $request : WP_REST_Request
-
API request.
Return values
WP_Rest_Response —get_routes()
Gets controller routes.
public
final get_routes() : array<string|int, mixed>
Return values
array<string|int, mixed> —boot()
Bootstraps controller properties.
protected
boot() : mixed
Return values
mixed —set_property()
Sets a property value.
protected
final set_property(string $name, mixed $value[, string $prefix = '' ]) : mixed
Parameters
- $name : string
-
Property name.
- $value : mixed
-
Property value.
- $prefix : string = ''
-
Method prefix.