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