19 lines
323 B
PHP
19 lines
323 B
PHP
|
<?php
|
||
|
|
||
|
abstract class AbstractAction
|
||
|
{
|
||
|
public abstract function handle();
|
||
|
|
||
|
public function param_exists($key) {
|
||
|
return !empty($_GET[$key]);
|
||
|
}
|
||
|
|
||
|
public function get_param($key, $default_value) {
|
||
|
return $_GET[$key] ?? $default_value;
|
||
|
}
|
||
|
|
||
|
public get_post_body() {
|
||
|
return file_get_contents("php://input");
|
||
|
}
|
||
|
}
|