| 1 |
<?php |
| 2 |
|
| 3 |
namespace Cookiez\Modules\Script\Classes; |
| 4 |
|
| 5 |
use Cookiez\Classes\Rest\Route; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
|
| 11 |
/** |
| 12 |
* Class Route_Base |
| 13 |
* Base class for cookie REST endpoints |
| 14 |
*/ |
| 15 |
class Route_Base extends Route { |
| 16 |
protected bool $override = false; |
| 17 |
protected $auth = true; |
| 18 |
protected string $path = ''; |
| 19 |
|
| 20 |
public function get_methods(): array { |
| 21 |
return []; |
| 22 |
} |
| 23 |
|
| 24 |
public function get_endpoint(): string { |
| 25 |
return 'script/' . $this->get_path(); |
| 26 |
} |
| 27 |
|
| 28 |
public function get_path(): string { |
| 29 |
return $this->path; |
| 30 |
} |
| 31 |
|
| 32 |
public function get_name(): string { |
| 33 |
return ''; |
| 34 |
} |
| 35 |
} |
| 36 |
|