2020-11-18 18:17:56 +01:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 11:52:11 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-11-18 18:17:56 +01:00
|
|
|
/**
|
2022-02-19 17:06:11 +01:00
|
|
|
* @copyright 2020 Ad Aures
|
2020-11-18 18:17:56 +01:00
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Controllers;
|
|
|
|
|
2021-05-06 16:00:48 +02:00
|
|
|
use App\Models\PlatformModel;
|
2020-11-18 18:17:56 +01:00
|
|
|
use CodeIgniter\Controller;
|
2021-05-19 18:35:13 +02:00
|
|
|
use CodeIgniter\HTTP\ResponseInterface;
|
2020-11-18 18:17:56 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Provide public access to all platforms so that they can be exported
|
|
|
|
*/
|
2021-05-12 16:00:25 +02:00
|
|
|
class PlatformController extends Controller
|
2020-11-18 18:17:56 +01:00
|
|
|
{
|
2021-05-06 16:00:48 +02:00
|
|
|
public function index(): ResponseInterface
|
2020-11-18 18:17:56 +01:00
|
|
|
{
|
2021-05-06 16:00:48 +02:00
|
|
|
$model = new PlatformModel();
|
2020-11-18 18:17:56 +01:00
|
|
|
|
|
|
|
return $this->response->setJSON($model->getPlatforms());
|
|
|
|
}
|
|
|
|
}
|