Yoast\WP\SEO\Task_List\Infrastructure\Endpoints
Get_Tasks_Endpoint{}└─ Task_List_Endpoint_Interface
Represents the get tasks endpoint.
Хуков нет.
Использование
$Get_Tasks_Endpoint = new Get_Tasks_Endpoint(); // use class methods
Методы
- public get_name()
- public get_namespace()
- public get_route()
- public get_url()
Код Get_Tasks_Endpoint{} Get Tasks Endpoint{} Yoast 28.3
class Get_Tasks_Endpoint implements Task_List_Endpoint_Interface {
/**
* Gets the name.
*
* @return string
*/
public function get_name(): string {
return 'getTasks';
}
/**
* Gets the namespace.
*
* @return string
*/
public function get_namespace(): string {
return Get_Tasks_Route::ROUTE_NAMESPACE;
}
/**
* Gets the route.
*
* @return string
*/
public function get_route(): string {
return Get_Tasks_Route::ROUTE_NAME;
}
/**
* Gets the URL.
*
* @return string
*/
public function get_url(): string {
return \rest_url( $this->get_namespace() . $this->get_route() );
}
}