Rest_Fields implements Registerable, Premium_Service
Register REST fields for document meta.
Tags
Interfaces, Classes and Traits
- Registerable
- Premium_Service
Table of Contents
- get_download_count() : int
- Get the download count.
- get_download_url() : string
- Get the document link.
- get_file_size() : string
- Get the file size.
- get_filename() : string
- Get the filename.
- get_version_history() : array<string|int, mixed>
- Get the version history.
- register() : mixed
- {@inheritdoc}
- register_rest_fields() : mixed
- Register the REST fields.
Methods
get_download_count()
Get the download count.
public
get_download_count(array<string|int, mixed> $object) : int
Parameters
- $object : array<string|int, mixed>
-
The object from the response.
Return values
int —The download count.
get_download_url()
Get the document link.
public
get_download_url(array<string|int, mixed> $object) : string
Parameters
- $object : array<string|int, mixed>
-
The object from the response.
Return values
string —The document link.
get_file_size()
Get the file size.
public
get_file_size(array<string|int, mixed> $object) : string
Parameters
- $object : array<string|int, mixed>
-
The object from the response.
Return values
string —The file size.
get_filename()
Get the filename.
public
get_filename(array<string|int, mixed> $object) : string
Parameters
- $object : array<string|int, mixed>
-
The object from the response.
Return values
string —The filename.
get_version_history()
Get the version history.
public
get_version_history(array<string|int, mixed> $object) : array<string|int, mixed>
Parameters
- $object : array<string|int, mixed>
-
The object from the response.
Return values
array<string|int, mixed> —The version history.
register()
{@inheritdoc}
public
register() : mixed
Return values
mixed —register_rest_fields()
Register the REST fields.
public
register_rest_fields() : mixed