Attachment extends Controller
Manages file attachments.
Table of Contents
- $routes : array<string|int, mixed>
- Controller routes.
- __construct() : mixed
- Class constructor.
- delete_attachment() : WP_Rest_Response
- Deletes attachment.
- get_routes() : array<string|int, mixed>
- Gets controller routes.
- update_attachment() : WP_Rest_Response
- Updates attachment.
- upload_attachment() : WP_Rest_Response
- Uploads attachment.
- 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 —delete_attachment()
Deletes attachment.
public
delete_attachment(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> —update_attachment()
Updates attachment.
public
update_attachment(WP_REST_Request $request) : WP_Rest_Response
Parameters
- $request : WP_REST_Request
-
API request.
Return values
WP_Rest_Response —upload_attachment()
Uploads attachment.
public
upload_attachment(WP_REST_Request $request) : WP_Rest_Response
Parameters
- $request : WP_REST_Request
-
API request.
Return values
WP_Rest_Response —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.