| | |
| | | <?php |
| | | namespace JVBase\rest\routes; |
| | | |
| | | use JVBase\Instance; |
| | | use JVBase\JVB; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\managers\IconsManager; |
| | |
| | | |
| | | class AdminRoutes extends Rest |
| | | { |
| | | protected array $fields; |
| | | protected $meta; |
| | | protected string $metaType; |
| | | protected string $content; |
| | | use Instance; |
| | | |
| | | public function __construct() |
| | | { |
| | | $this->cacheName = 'itsme'; |
| | | // $this->cacheName = 'itsme'; |
| | | parent::__construct(); |
| | | // $this->cache = Cache::for($this->cacheName, null, $this->cacheTtl); |
| | | } |
| | | public function registerRoutes():void |
| | | { |
| | |
| | | ); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param array $filters |
| | | * |
| | | * @return array |
| | | */ |
| | | protected function checkFilters(array $filters) |
| | | { |
| | | global $karma; |
| | | $out = []; |
| | | foreach ($filters as $type => $value) { |
| | | if (!array_key_exists($type, $karma)) { |
| | | continue; |
| | | } |
| | | $out[$type] = jvbSanitizeIDList($value); |
| | | } |
| | | return $out; |
| | | } |
| | | |
| | | /** |
| | | * Handle cache-related actions |
| | | */ |