<?php
/**
* Base class for REST API endpoint
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( ! class_exists( 'Jet_Engine_Base_API_Endpoint' ) ) {
/**
* Define Jet_Engine_Base_API_Endpoint class
*/
abstract class Jet_Engine_Base_API_Endpoint {
/**
* Returns route name
*
* @return string
*/
abstract public function get_name();
/**
* API callback
*
* @return void
*/
abstract public function callback( $request );
/**
* Returns endpoint request method - GET/POST/PUT/DELTE
*
* @return string
*/
public function get_method() {
return 'GET';
}
/**
* Check user access to current end-popint
*
* @return bool
*/
public function permission_callback( $request ) {
return true;
}
/**
* Get query param. Regex with query parameters
*
* Example:
*
* (?P<id>[\d]+)/(?P<meta_key>[\w-]+)
*
* @return string
*/
public function get_query_params() {
return '';
}
/**
* Returns arguments config
*
* Example:
*
* array(
* array(
* 'type' => array(
* 'default' => '',
* 'required' => false,
* ),
* )
*
* @return array
*/
public function get_args() {
return array();
}
}
}| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| base-admin-page.php | 2026-07-21 14:15 | 2.1 KB | 76129f60960:kunden | -xw-x----- | |
| base-api-endpoint.php | 2026-07-21 14:15 | 1.26 KB | 76129f60960:kunden | -xw-x----- | |
| base-data.php | 2026-07-21 14:15 | 13.37 KB | 76129f60960:kunden | -xw-x----- | |
| base-db.php | 2026-07-21 14:15 | 21.72 KB | 76129f60960:kunden | -xw-x----- | |
| base-external-module.php | 2026-07-21 14:15 | 1.71 KB | 76129f60960:kunden | -xw-x----- | |
| base-macros.php | 2026-07-21 14:15 | 1 KB | 76129f60960:kunden | -xw-x----- | |
| base-module.php | 2026-07-21 14:15 | 1.88 KB | 76129f60960:kunden | -xw-x----- | |
| base-wp-instance.php | 2026-07-21 14:15 | 7.49 KB | 76129f60960:kunden | -xw-x----- | |