2024-07-29 15:57:20 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use kernel\App;
|
2024-12-13 14:27:46 +03:00
|
|
|
|
use kernel\console\controllers\MigrationController;
|
2024-07-29 15:57:20 +03:00
|
|
|
|
use Phroute\Phroute\RouteCollector;
|
|
|
|
|
|
|
|
|
|
App::$collector->console("hello", [\kernel\console\controllers\MainController::class, "indexAction"]);
|
2024-12-12 15:04:45 +03:00
|
|
|
|
App::$collector->console("help", [\kernel\console\controllers\MainController::class, "actionHelp"]);
|
2024-07-29 15:57:20 +03:00
|
|
|
|
|
|
|
|
|
App::$collector->group(["prefix" => "migration"], callback: function (RouteCollector $router){
|
2024-12-13 14:27:46 +03:00
|
|
|
|
App::$collector->console('run',
|
|
|
|
|
[MigrationController::class, 'actionRun'],
|
|
|
|
|
additionalInfo: ['description' => 'Запуск существующих миграций']
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('init',
|
|
|
|
|
[MigrationController::class, 'actionCreateMigrationTable'],
|
|
|
|
|
additionalInfo: ['description' => 'Инициализация миграций']
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('create',
|
|
|
|
|
[MigrationController::class, 'actionCreate'],
|
|
|
|
|
additionalInfo: ['description' => 'Создание миграции', 'params' => ['--name' => 'Название миграции', '--path' => 'Путь по которому будет создана миграция']]
|
|
|
|
|
);
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('rollback',
|
|
|
|
|
[MigrationController::class, 'actionRollback'],
|
|
|
|
|
additionalInfo: ['description' => 'Откатить миграции']
|
|
|
|
|
);
|
2024-07-29 15:57:20 +03:00
|
|
|
|
});
|
|
|
|
|
|
2024-09-10 16:44:27 +03:00
|
|
|
|
App::$collector->group(["prefix" => "admin-theme"], callback: function (RouteCollector $router){
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('install',
|
|
|
|
|
[\kernel\console\controllers\AdminThemeController::class, 'actionInstallTheme'],
|
|
|
|
|
additionalInfo: ['description' => 'Установить тему админ-панели', 'params' => ['--path' => 'Путь к устанавливаемой теме']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('uninstall',
|
|
|
|
|
[\kernel\console\controllers\AdminThemeController::class, 'actionUninstallTheme'],
|
|
|
|
|
additionalInfo: ['description' => 'Удалить тему админ-панели', 'params' => ['--path' => 'Путь к удаляемой теме']]
|
|
|
|
|
);
|
2024-12-23 14:14:59 +03:00
|
|
|
|
App::$collector->console('pack',
|
|
|
|
|
[\kernel\console\controllers\AdminThemeController::class, 'actionPackTheme'],
|
|
|
|
|
additionalInfo: ['description' => 'Заархивировать тему админ-панели', 'params' => ['--path' => 'Путь к теме, которую нужно заархивировать']]
|
|
|
|
|
);
|
2024-09-10 16:44:27 +03:00
|
|
|
|
});
|
|
|
|
|
|
2024-10-22 16:40:40 +03:00
|
|
|
|
App::$collector->group(["prefix" => "secure"], callback: function (RouteCollector $router){
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('create-secret-key',
|
|
|
|
|
[\kernel\console\controllers\SecureController::class, 'actionCreateSecretKey'],
|
|
|
|
|
additionalInfo: ['description' => 'Генерация секрктного ключа и запись его в .env']
|
|
|
|
|
);
|
2024-10-22 16:40:40 +03:00
|
|
|
|
});
|
|
|
|
|
|
2024-09-23 17:03:42 +03:00
|
|
|
|
App::$collector->group(["prefix" => "admin"], callback: function (RouteCollector $router){
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('init',
|
|
|
|
|
[\kernel\console\controllers\AdminConsoleController::class, 'actionInit'],
|
|
|
|
|
additionalInfo: ['description' => 'Инициализация админ-панели']
|
|
|
|
|
);
|
2024-09-23 17:03:42 +03:00
|
|
|
|
});
|
|
|
|
|
|
2024-10-08 12:16:41 +03:00
|
|
|
|
App::$collector->group(["prefix" => "module"], callback: function (RouteCollector $router){
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('install',
|
|
|
|
|
[\kernel\console\controllers\ModuleController::class, 'actionInstallModule'],
|
|
|
|
|
additionalInfo: ['description' => 'Установка модуля', 'params' => ['--path' => 'Путь к устанавливаемому модулю']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('uninstall',
|
|
|
|
|
[\kernel\console\controllers\ModuleController::class, 'actionUninstallModule'],
|
|
|
|
|
additionalInfo: ['description' => 'Удалить модуль', 'params' => ['--path' => 'Путь к удаляемому модулю']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('pack',
|
|
|
|
|
[\kernel\console\controllers\ModuleController::class, 'actionPackModule'],
|
|
|
|
|
additionalInfo: ['description' => 'Заархивировать модуль', 'params' => ['--path' => 'Путь к модулю, который нужно заархивировать']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('update',
|
|
|
|
|
[\kernel\console\controllers\ModuleController::class, 'actionUpdateModule'],
|
|
|
|
|
additionalInfo: ['description' => 'Обновить модуль', 'params' => ['--path' => 'Путь к архиву с модулем']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('construct',
|
|
|
|
|
[\kernel\console\controllers\ModuleController::class, 'actionConstructModule'],
|
|
|
|
|
additionalInfo: ['description' => 'Сгенерировать модуль']
|
|
|
|
|
);
|
2024-10-08 12:16:41 +03:00
|
|
|
|
});
|
|
|
|
|
|
2024-10-14 15:52:52 +03:00
|
|
|
|
App::$collector->group(["prefix" => "kernel"], callback: function (RouteCollector $router){
|
2024-12-13 16:48:53 +03:00
|
|
|
|
App::$collector->console('pack',
|
|
|
|
|
[\kernel\console\controllers\KernelController::class, 'actionPackKernel'],
|
|
|
|
|
additionalInfo: ['description' => 'Заархивировать ядро', 'params' => ['--path' => 'Путь к ядру']]
|
|
|
|
|
);
|
|
|
|
|
App::$collector->console('update',
|
|
|
|
|
[\kernel\console\controllers\KernelController::class, 'actionUpdateKernel'],
|
|
|
|
|
additionalInfo: [
|
|
|
|
|
'description' => 'Обновить модуль',
|
|
|
|
|
'params' =>
|
|
|
|
|
[
|
|
|
|
|
'--path' => 'Путь к архиву ядра',
|
|
|
|
|
'bootstrap' => 'Обновить bootstrap',
|
|
|
|
|
'composer' => 'Обновить composer',
|
|
|
|
|
'env' => 'Обновить .env.example'
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
);
|
2024-10-14 15:52:52 +03:00
|
|
|
|
});
|
|
|
|
|
|