Skip to content

Commit

Permalink
refactor: moved Admin API related controller in the correct folder
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Nov 18, 2024
1 parent 0a9322d commit 57eb7cb
Show file tree
Hide file tree
Showing 25 changed files with 56 additions and 59 deletions.
48 changes: 24 additions & 24 deletions phpmyfaq/src/admin-routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
* @since 2023-07-08
*/

use phpMyFAQ\Controller\Administration\AttachmentController;
use phpMyFAQ\Controller\Administration\CategoryController;
use phpMyFAQ\Controller\Administration\CommentController;
use phpMyFAQ\Controller\Administration\ConfigurationController;
use phpMyFAQ\Controller\Administration\ConfigurationTabController;
use phpMyFAQ\Controller\Administration\DashboardController;
use phpMyFAQ\Controller\Administration\ElasticsearchController;
use phpMyFAQ\Controller\Administration\ExportController;
use phpMyFAQ\Controller\Administration\FaqController;
use phpMyFAQ\Controller\Administration\FormController;
use phpMyFAQ\Controller\Administration\GlossaryController;
use phpMyFAQ\Controller\Administration\GroupController;
use phpMyFAQ\Controller\Administration\ImageController;
use phpMyFAQ\Controller\Administration\InstanceController;
use phpMyFAQ\Controller\Administration\MarkdownController;
use phpMyFAQ\Controller\Administration\NewsController;
use phpMyFAQ\Controller\Administration\QuestionController;
use phpMyFAQ\Controller\Administration\SearchController;
use phpMyFAQ\Controller\Administration\SessionController;
use phpMyFAQ\Controller\Administration\StatisticsController;
use phpMyFAQ\Controller\Administration\StopWordController;
use phpMyFAQ\Controller\Administration\TagController;
use phpMyFAQ\Controller\Administration\UpdateController;
use phpMyFAQ\Controller\Administration\UserController;
use phpMyFAQ\Controller\Administration\Api\AttachmentController;
use phpMyFAQ\Controller\Administration\Api\CategoryController;
use phpMyFAQ\Controller\Administration\Api\CommentController;
use phpMyFAQ\Controller\Administration\Api\ConfigurationController;
use phpMyFAQ\Controller\Administration\Api\ConfigurationTabController;
use phpMyFAQ\Controller\Administration\Api\DashboardController;
use phpMyFAQ\Controller\Administration\Api\ElasticsearchController;
use phpMyFAQ\Controller\Administration\Api\ExportController;
use phpMyFAQ\Controller\Administration\Api\FaqController;
use phpMyFAQ\Controller\Administration\Api\FormController;
use phpMyFAQ\Controller\Administration\Api\GlossaryController;
use phpMyFAQ\Controller\Administration\Api\GroupController;
use phpMyFAQ\Controller\Administration\Api\ImageController;
use phpMyFAQ\Controller\Administration\Api\InstanceController;
use phpMyFAQ\Controller\Administration\Api\MarkdownController;
use phpMyFAQ\Controller\Administration\Api\NewsController;
use phpMyFAQ\Controller\Administration\Api\QuestionController;
use phpMyFAQ\Controller\Administration\Api\SearchController;
use phpMyFAQ\Controller\Administration\Api\SessionController;
use phpMyFAQ\Controller\Administration\Api\StatisticsController;
use phpMyFAQ\Controller\Administration\Api\StopWordController;
use phpMyFAQ\Controller\Administration\Api\TagController;
use phpMyFAQ\Controller\Administration\Api\UpdateController;
use phpMyFAQ\Controller\Administration\Api\UserController;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-26
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Attachment\AttachmentException;
use phpMyFAQ\Attachment\AttachmentFactory;
Expand All @@ -33,7 +33,7 @@
class AttachmentController extends AbstractController
{
/**
* @throws Exception
* @throws \Exception
*/
#[Route('./admin/api/content/attachments')]
public function delete(Request $request): JsonResponse
Expand Down Expand Up @@ -62,7 +62,7 @@ public function delete(Request $request): JsonResponse
}

/**
* @throws Exception
* @throws \Exception
*/
#[Route('./admin/api/content/attachments/refresh')]
public function refresh(Request $request): JsonResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-27
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Category;
use phpMyFAQ\Category\Image;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-25
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Comments;
use phpMyFAQ\Controller\AbstractController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-26
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-30
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-15
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Administration\Api;
use phpMyFAQ\Controller\AbstractController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-26
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use Elastic\Elasticsearch\Exception\ClientResponseException;
use Elastic\Elasticsearch\Exception\ServerResponseException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
* @since 2023-12-23
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use League\CommonMark\Exception\CommonMarkException;
use phpMyFAQ\Administration\HttpStreamer;
use phpMyFAQ\Administration\Report;
use phpMyFAQ\Category;
use phpMyFAQ\Configuration;
use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
use phpMyFAQ\Enums\PermissionType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @since 2023-10-28
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use DateTime;
use Exception;
Expand All @@ -32,8 +32,8 @@
use phpMyFAQ\Enums\PermissionType;
use phpMyFAQ\Enums\SeoType;
use phpMyFAQ\Faq;
use phpMyFAQ\Faq\Permission as FaqPermission;
use phpMyFAQ\Faq\Import;
use phpMyFAQ\Faq\Permission as FaqPermission;
use phpMyFAQ\Filter;
use phpMyFAQ\Helper\CategoryHelper;
use phpMyFAQ\Helper\SearchHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
* @since 2024-03-09
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Core\Exception;
use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Controller\Administration\Route;
use phpMyFAQ\Core\Exception;
use phpMyFAQ\Enums\PermissionType;
use phpMyFAQ\Filter;
use phpMyFAQ\Forms;
use phpMyFAQ\Session\Token;
use phpMyFAQ\Translation;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use phpMyFAQ\Filter;
use phpMyFAQ\Session\Token;
use phpMyFAQ\Forms;
use Symfony\Component\HttpFoundation\Response;

class FormController extends AbstractController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2024-01-27
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-27
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-26
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-28
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Configuration\DatabaseConfiguration;
use phpMyFAQ\Controller\AbstractController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-25
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Exception\CommonMarkException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2024-04-20
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use DateTime;
use phpMyFAQ\Controller\AbstractController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
* @since 2023-10-30
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
use phpMyFAQ\Enums\PermissionType;
use phpMyFAQ\Question;
use phpMyFAQ\Session\Token;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-26
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @since 2024-01-13
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use Exception;
use phpMyFAQ\Controller\AbstractController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2024-04-21
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use JsonException;
use phpMyFAQ\Administration\AdminLog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-28
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* @since 2023-10-27
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Configuration;
use phpMyFAQ\Controller\AbstractController;
use phpMyFAQ\Core\Exception;
use phpMyFAQ\Entity\Tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-07-29
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use DateTime;
use DateTimeInterface;
Expand All @@ -24,7 +24,6 @@
use phpMyFAQ\Core\Exception;
use phpMyFAQ\Enums\PermissionType;
use phpMyFAQ\Filter;
use phpMyFAQ\Setup\EnvironmentConfigurator;
use phpMyFAQ\Setup\Update;
use phpMyFAQ\Setup\Upgrade;
use phpMyFAQ\System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @since 2023-10-27
*/

namespace phpMyFAQ\Controller\Administration;
namespace phpMyFAQ\Controller\Administration\Api;

use phpMyFAQ\Administration\Report;
use phpMyFAQ\Auth;
Expand Down

0 comments on commit 57eb7cb

Please sign in to comment.