nativegallery/app/Controllers/ApiController.php

100 lines
3.3 KiB
PHP
Raw Permalink Normal View History

2024-07-04 12:04:41 +03:00
<?php
namespace App\Controllers;
use \App\Services\{Router, Auth, DB, Json};
use \App\Controllers\ExceptionRegister;
use \App\Core\Page;
2024-07-04 13:20:40 +03:00
use \App\Controllers\Api\{Login, Register};
2024-07-19 01:37:41 +03:00
use \App\Controllers\Api\Subscribe as SubscribeUser;
2024-07-05 07:26:39 +03:00
use \App\Controllers\Api\Images\{Upload};
2024-07-05 11:13:28 +03:00
use \App\Controllers\Api\Images\Rate as PhotoVote;
2024-07-13 02:47:11 +03:00
use \App\Controllers\Api\Images\Compress as PhotoCompress;
2024-07-20 23:50:52 +03:00
use \App\Controllers\Api\Images\CheckAll as PhotoCheckAll;
use \App\Controllers\Api\Images\LoadRecent as PhotoLoadRecent;
2024-10-06 01:26:58 +03:00
use \App\Controllers\Api\Images\Favorite as PhotoFavorite;
2024-07-21 00:48:11 +03:00
use \App\Controllers\Api\Images\Stats as PhotoStats;
2024-07-06 09:57:51 +03:00
use \App\Controllers\Api\Images\Comments\Create as PhotoComment;
2024-10-05 14:16:39 +03:00
use \App\Controllers\Api\Images\Comments\Edit as PhotoCommentEdit;
2024-10-08 21:42:55 +03:00
use \App\Controllers\Api\Images\Comments\Delete as PhotoCommentDelete;
2024-07-06 09:57:51 +03:00
use \App\Controllers\Api\Images\Comments\Load as PhotoCommentLoad;
use \App\Controllers\Api\Images\Comments\Rate as PhotoCommentVote;
use \App\Controllers\Api\Vehicles\Load as VehiclesLoad;
2024-07-05 15:03:35 +03:00
use \App\Controllers\Api\Profile\Update as ProfileUpdate;
2024-10-03 20:35:13 +03:00
use \App\Controllers\Api\Users\LoadUser as UserLoad;
2024-07-18 16:05:32 +03:00
use \App\Controllers\Api\Admin\Images\SetVisibility as AdminPhotoSetVisibility;
2024-07-21 17:22:27 +03:00
use \App\Controllers\Api\Admin\CreateNews as AdminCreateNews;
2024-07-21 17:28:10 +03:00
use \App\Controllers\Api\Admin\LoadNews as AdminLoadNews;
2024-10-06 23:03:55 +03:00
use \App\Controllers\Api\Admin\GetVehicleInputs as AdminGetVehicleInputs;
2024-07-04 12:50:26 +03:00
class ApiController
2024-07-04 12:04:41 +03:00
{
2024-07-04 12:50:26 +03:00
public static function login() {
return new Login();
2024-07-04 12:04:41 +03:00
}
2024-07-04 13:20:40 +03:00
public static function register() {
return new Register();
}
2024-07-05 07:26:39 +03:00
public static function upload() {
return new Upload();
}
2024-07-05 11:13:28 +03:00
public static function photovote() {
return new PhotoVote();
}
2024-10-06 01:26:58 +03:00
public static function photofavorite() {
return new PhotoFavorite();
}
2024-07-05 11:51:14 +03:00
public static function photocomment() {
return new PhotoComment();
}
2024-10-05 14:16:39 +03:00
public static function photocommentedit() {
return new PhotoCommentEdit();
}
2024-10-08 21:42:55 +03:00
public static function photocommentdelete() {
return new PhotoCommentDelete();
}
2024-07-06 09:57:51 +03:00
public static function photocommentvote() {
return new PhotoCommentVote();
}
2024-07-05 11:51:14 +03:00
public static function photocommentload() {
return new PhotoCommentLoad();
}
2024-07-05 15:03:35 +03:00
public static function updateprofile() {
return new ProfileUpdate();
}
2024-07-13 02:47:11 +03:00
public static function photocompress() {
return new PhotoCompress();
}
2024-07-18 16:05:32 +03:00
public static function adminsetvis() {
return new AdminPhotoSetVisibility();
}
2024-07-19 01:37:41 +03:00
public static function subscribeuser() {
return new SubscribeUser();
}
2024-07-20 23:50:52 +03:00
public static function checkallphotos() {
return new PhotoCheckAll();
}
public static function recentphotos() {
return new PhotoLoadRecent();
}
2024-10-03 20:35:13 +03:00
public static function loaduser() {
return new UserLoad();
}
2024-07-21 00:48:11 +03:00
public static function photostats() {
return new PhotoStats();
}
2024-07-21 17:22:27 +03:00
public static function admincreatenews() {
return new AdminCreateNews();
}
2024-07-21 17:28:10 +03:00
public static function adminloadnews() {
return new AdminLoadNews();
}
2024-10-06 23:03:55 +03:00
public static function admingetvehicleinputs() {
return new AdminGetVehicleInputs();
}
public static function vehiclesload() {
return new VehiclesLoad();
}
2024-07-05 11:13:28 +03:00
2024-07-04 12:04:41 +03:00
}