Initial project scaffold for a PHP Media API including routing, controllers, models and services under api/ (Router, Media/Cast/Image/Settings controllers, models, database/bootstrap files and automatic docs service). Adds Docker support (Dockerfile, docker-compose.yml, DOCKER_README.md, php-custom.ini), .htaccess for pretty URLs, API documentation and example payloads (API_EXAMPLES.md, api/README.md, api_examples/*.json), image handling service and logging, plus a comprehensive .gitignore. This commit provides a runnable development environment and example requests to get the API up and tested quickly.
24 lines
548 B
PHP
24 lines
548 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/MediaType.php';
|
|
|
|
class Console extends MediaType {
|
|
protected function getType() {
|
|
return 'Console';
|
|
}
|
|
|
|
protected function getTypeSpecificFields() {
|
|
return [];
|
|
}
|
|
|
|
protected function validateTypeSpecificFields($data) {
|
|
// Console spezifische Validierung
|
|
}
|
|
|
|
public function search($filters = [], $page = 1, $limit = 20) {
|
|
// Nur Consoles suchen
|
|
$filters['type'] = 'Console';
|
|
return parent::search($filters, $page, $limit);
|
|
}
|
|
}
|