Yoast\WP\SEO\AI_Generator\Infrastructure\Endpoints
Get_Suggestions_Endpoint{}└─ Endpoint_Interface
Represents the setup steps tracking endpoint.
Хуков нет.
Использование
$Get_Suggestions_Endpoint = new Get_Suggestions_Endpoint(); // use class methods
Методы
- public get_name()
- public get_namespace()
- public get_route()
- public get_url()
- public rest_url( $this->get_namespace() . $this->get_route() )
- ERROR: no method name found on line `return 'getSuggestions';`
- ERROR: no method name found on line `return Get_Suggestions_Route::ROUTE_NAMESPACE;`
- ERROR: no method name found on line `*/`
- ERROR: no method name found on line `return Get_Suggestions_Route::ROUTE_PREFIX;`
- ERROR: no method name found on line `*/`
Код Get_Suggestions_Endpoint{} Get Suggestions Endpoint{} Yoast 27.7
class Get_Suggestions_Endpoint implements Endpoint_Interface {
/**
* Gets the name.
*
* @return string
*/
public function get_name(): string {
return 'getSuggestions';
}
/**
* Gets the namespace.
*
* @return string
*/
public function get_namespace(): string {
return Get_Suggestions_Route::ROUTE_NAMESPACE;
}
/**
* Gets the route.
*
* @throws Exception If the route prefix is not overwritten this throws.
* @return string
*/
public function get_route(): string {
return Get_Suggestions_Route::ROUTE_PREFIX;
}
/**
* Gets the URL.
*
* @return string
*/
public function get_url(): string {
return \rest_url( $this->get_namespace() . $this->get_route() );
}
}