├── tests ├── _root │ ├── journal.log │ ├── logs │ │ └── .gitkeep │ ├── shared │ │ ├── store │ │ │ └── .gitkeep │ │ ├── emails │ │ │ └── .gitkeep │ │ ├── config │ │ │ ├── hooks.php │ │ │ ├── env.php │ │ │ ├── view_cache.php │ │ │ ├── app.php │ │ │ ├── modules.php │ │ │ ├── session.php │ │ │ ├── view.php │ │ │ ├── logging.php │ │ │ ├── lang.php │ │ │ ├── captcha.php │ │ │ ├── fs.php │ │ │ ├── cors.php │ │ │ ├── auth.php │ │ │ ├── mailer.php │ │ │ ├── cache.php │ │ │ ├── uploads.php │ │ │ └── database.php │ │ ├── resources │ │ │ └── lang │ │ │ │ ├── en │ │ │ │ └── custom.php │ │ │ │ └── es │ │ │ │ └── custom.php │ │ ├── views │ │ │ ├── email │ │ │ │ └── template.php │ │ │ └── errors │ │ │ │ └── 404.php │ │ ├── Models │ │ │ ├── TestNotesModel.php │ │ │ ├── TestUserProfessionModel.php │ │ │ ├── TestPostModel.php │ │ │ ├── TestProductsModel.php │ │ │ ├── TestTicketModel.php │ │ │ ├── TestEventModel.php │ │ │ ├── TestUserMeetingModel.php │ │ │ ├── TestUserEventModel.php │ │ │ ├── TestProfileModel.php │ │ │ └── TestUserModel.php │ │ └── Services │ │ │ └── TokenService.php │ ├── cache │ │ └── data │ │ │ └── .gitkeep │ ├── modules │ │ └── Test │ │ │ ├── Views │ │ │ ├── post.php │ │ │ ├── index.php │ │ │ ├── index.twig.php │ │ │ ├── partial.php │ │ │ ├── layout.twig.php │ │ │ └── layout.php │ │ │ ├── resources │ │ │ └── lang │ │ │ │ ├── en │ │ │ │ └── custom.php │ │ │ │ └── es │ │ │ │ └── custom.php │ │ │ ├── routes │ │ │ └── routes.php │ │ │ ├── Controllers │ │ │ └── TestController.php │ │ │ ├── config │ │ │ └── dependencies.php │ │ │ └── Transformers │ │ │ └── PostTransformer.php │ ├── .env.example │ └── php8fe1.tmp ├── Unit │ ├── Environment │ │ └── Helpers │ │ │ └── EnvHelperTest.php │ ├── Libraries │ │ ├── Session │ │ │ └── TestCaseHelper.php │ │ ├── Transformer │ │ │ └── PostTransformer.php │ │ ├── Database │ │ │ └── Adapters │ │ │ │ ├── Sleekdb │ │ │ │ └── SleekDbalTest.php │ │ │ │ └── Idiorm │ │ │ │ └── IdiormDbalTest.php │ │ ├── Csrf │ │ │ └── Helpers │ │ │ │ └── CsrfHelperFunctionsTest.php │ │ ├── Cookie │ │ │ └── Helpers │ │ │ │ └── CookieHelperFunctionsTest.php │ │ ├── Mailer │ │ │ ├── MailerTestCase.php │ │ │ └── Adapters │ │ │ │ ├── MandrillAdapterTest.php │ │ │ │ ├── SendgridAdapterTest.php │ │ │ │ ├── SendinblueAdapterTest.php │ │ │ │ └── MailgunAdapterTest.php │ │ ├── Storage │ │ │ └── Adapters │ │ │ │ ├── GoogleDrive │ │ │ │ └── GoogleDriveTokenServiceTestCase.php │ │ │ │ └── Dropbox │ │ │ │ └── DropboxTokenServiceTestCase.php │ │ ├── Auth │ │ │ └── Helpers │ │ │ │ └── AuthHelperFunctionsTest.php │ │ ├── Logger │ │ │ └── Adapters │ │ │ │ └── MessageAdapterTest.php │ │ ├── Lang │ │ │ └── TranslatorTest.php │ │ └── Captcha │ │ │ └── Helpers │ │ │ └── CaptchaHelperFunctionsTest.php │ ├── Service │ │ ├── Helpers │ │ │ └── ServiceHelperFunctionTest.php │ │ └── QtServiceTest.php │ ├── View │ │ └── Factories │ │ │ └── ViewFactoryTest.php │ ├── Renderer │ │ └── Adapters │ │ │ ├── HtmlAdapterTest.php │ │ │ └── TwigAdapterTest.php │ ├── Config │ │ └── Helpers │ │ │ └── ConfigHelperFunctionsTest.php │ ├── Http │ │ └── Traits │ │ │ └── Response │ │ │ ├── HttpResponseHeaderTest.php │ │ │ └── HttpResponseStatusTest.php │ ├── Loader │ │ └── LoaderTest.php │ ├── Router │ │ └── RouteControllerTest.php │ └── App │ │ └── Adapters │ │ └── WebAppAdapterTest.php ├── Helpers │ └── functions.php └── bootstrap.php ├── _config.yml ├── src ├── Module │ ├── Templates │ │ ├── DemoWeb │ │ │ └── src │ │ │ │ ├── resources │ │ │ │ └── .gitkeep │ │ │ │ ├── Views │ │ │ │ ├── partials │ │ │ │ │ ├── messages │ │ │ │ │ │ ├── success.php.tpl │ │ │ │ │ │ └── error.php.tpl │ │ │ │ │ ├── logo.php.tpl │ │ │ │ │ ├── bubbles.php.tpl │ │ │ │ │ ├── search.php.tpl │ │ │ │ │ ├── footer.php.tpl │ │ │ │ │ └── language.php.tpl │ │ │ │ ├── post │ │ │ │ │ ├── partials │ │ │ │ │ │ ├── back.php.tpl │ │ │ │ │ │ ├── modal.php.tpl │ │ │ │ │ │ ├── comment-form.php.tpl │ │ │ │ │ │ ├── my-post-item.php.tpl │ │ │ │ │ │ └── comment-item.php.tpl │ │ │ │ │ ├── post.php.tpl │ │ │ │ │ ├── comments.php.tpl │ │ │ │ │ ├── single.php.tpl │ │ │ │ │ └── my-posts.php.tpl │ │ │ │ ├── layouts │ │ │ │ │ └── main.php.tpl │ │ │ │ ├── pages │ │ │ │ │ └── index.php.tpl │ │ │ │ └── account │ │ │ │ │ └── partials │ │ │ │ │ └── account.php.tpl │ │ │ │ ├── Enums │ │ │ │ └── Role.php.tpl │ │ │ │ ├── Middlewares │ │ │ │ ├── Auth.php.tpl │ │ │ │ └── Guest.php.tpl │ │ │ │ ├── Transformers │ │ │ │ ├── CommentTransformer.php.tpl │ │ │ │ └── PostTransformer.php.tpl │ │ │ │ ├── config │ │ │ │ ├── database.php.tpl │ │ │ │ └── auth.php.tpl │ │ │ │ └── Models │ │ │ │ └── User.php.tpl │ │ ├── DemoApi │ │ │ └── src │ │ │ │ ├── resources │ │ │ │ └── .gitkeep │ │ │ │ ├── Enums │ │ │ │ └── Role.php.tpl │ │ │ │ ├── config │ │ │ │ ├── cors.php.tpl │ │ │ │ ├── database.php.tpl │ │ │ │ └── auth.php.tpl │ │ │ │ ├── Controllers │ │ │ │ ├── OpenApi │ │ │ │ │ └── OpenApiController.php.tpl │ │ │ │ └── BaseController.php.tpl │ │ │ │ ├── Transformers │ │ │ │ ├── CommentTransformer.php.tpl │ │ │ │ └── PostTransformer.php.tpl │ │ │ │ ├── Middlewares │ │ │ │ ├── Signout.php.tpl │ │ │ │ ├── Auth.php.tpl │ │ │ │ └── Comment.php.tpl │ │ │ │ └── Models │ │ │ │ └── User.php.tpl │ │ ├── Toolkit │ │ │ └── src │ │ │ │ ├── Views │ │ │ │ ├── pages │ │ │ │ │ ├── dashboard │ │ │ │ │ │ └── index.php.tpl │ │ │ │ │ ├── logs │ │ │ │ │ │ └── index.php.tpl │ │ │ │ │ ├── email │ │ │ │ │ │ └── index.php.tpl │ │ │ │ │ └── database │ │ │ │ │ │ └── index.php.tpl │ │ │ │ ├── partials │ │ │ │ │ ├── delete-modal.php.tpl │ │ │ │ │ ├── jsoneditor-modal.php.tpl │ │ │ │ │ ├── navbar.php.tpl │ │ │ │ │ ├── database-row.php.tpl │ │ │ │ │ └── email-item.php.tpl │ │ │ │ └── layouts │ │ │ │ │ ├── iframe.php.tpl │ │ │ │ │ └── main.php.tpl │ │ │ │ ├── config │ │ │ │ └── basic_auth.php.tpl │ │ │ │ ├── Services │ │ │ │ └── DashboardService.php.tpl │ │ │ │ └── routes │ │ │ │ └── routes.php.tpl │ │ ├── DefaultApi │ │ │ └── src │ │ │ │ ├── routes │ │ │ │ └── routes.php.tpl │ │ │ │ ├── config │ │ │ │ └── cors.php.tpl │ │ │ │ └── Controllers │ │ │ │ ├── OpenApi │ │ │ │ └── OpenApiController.php.tpl │ │ │ │ └── MainController.php.tpl │ │ └── DefaultWeb │ │ │ └── src │ │ │ ├── routes │ │ │ └── routes.php.tpl │ │ │ └── Views │ │ │ ├── partials │ │ │ └── bubbles.php.tpl │ │ │ ├── index.php.tpl │ │ │ └── layouts │ │ │ └── main.php.tpl │ └── Enums │ │ └── ExceptionMessages.php ├── App │ ├── Config │ │ └── dependencies.php │ ├── Contracts │ │ └── AppInterface.php │ ├── Helpers │ │ ├── uuid.php │ │ └── app.php │ ├── Enums │ │ ├── ReservedKeys.php │ │ └── ExceptionMessages.php │ ├── Exceptions │ │ ├── AppException.php │ │ └── StopExecutionException.php │ └── Adapters │ │ └── AppAdapter.php ├── Config │ ├── Helpers │ │ └── config.php │ ├── Enums │ │ └── ExceptionMessages.php │ └── Exceptions │ │ └── ConfigException.php ├── Hook │ ├── Helpers │ │ └── hook.php │ ├── Enums │ │ └── ExceptionMessages.php │ └── Exceptions │ │ └── HookException.php ├── Libraries │ ├── Cookie │ │ ├── Helpers │ │ │ └── cookie.php │ │ └── Contracts │ │ │ └── CookieStorageInterface.php │ ├── Cache │ │ ├── Exceptions │ │ │ └── CacheException.php │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Helpers │ │ │ └── cache.php │ ├── Mailer │ │ ├── Exceptions │ │ │ └── MailerException.php │ │ └── Helpers │ │ │ └── mailer.php │ ├── Captcha │ │ ├── Exceptions │ │ │ └── CaptchaException.php │ │ └── Helpers │ │ │ └── captcha.php │ ├── ResourceCache │ │ └── Exceptions │ │ │ └── ResourceCacheException.php │ ├── Database │ │ └── Enums │ │ │ ├── Relation.php │ │ │ ├── ExceptionMessages.php │ │ │ └── Key.php │ ├── Jwt │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Exceptions │ │ │ └── JwtException.php │ ├── HttpClient │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Exceptions │ │ │ └── HttpClientException.php │ ├── Transformer │ │ ├── Contracts │ │ │ └── TransformerInterface.php │ │ ├── Helpers │ │ │ └── transformer.php │ │ └── Transformer.php │ ├── Csrf │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ ├── Helpers │ │ │ └── csrf.php │ │ └── Exceptions │ │ │ └── CsrfException.php │ ├── Archive │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Exceptions │ │ │ └── ArchiveException.php │ ├── Asset │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ ├── Helpers │ │ │ └── asset.php │ │ └── Exceptions │ │ │ └── AssetException.php │ ├── Session │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ ├── Helpers │ │ │ └── session.php │ │ ├── Exceptions │ │ │ └── SessionException.php │ │ └── Contracts │ │ │ └── SessionStorageInterface.php │ ├── Hasher │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Exceptions │ │ │ └── HasherException.php │ ├── Logger │ │ ├── Contracts │ │ │ └── ReportableInterface.php │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ ├── Adapters │ │ │ └── MessageAdapter.php │ │ └── Exceptions │ │ │ └── LoggerException.php │ ├── Lang │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ └── Exceptions │ │ │ └── LangException.php │ ├── Encryption │ │ ├── Contracts │ │ │ └── EncryptionInterface.php │ │ └── Enums │ │ │ └── ExceptionMessages.php │ ├── Storage │ │ ├── Helpers │ │ │ └── fs.php │ │ ├── Enums │ │ │ └── ExceptionMessages.php │ │ ├── Contracts │ │ │ ├── TokenServiceInterface.php │ │ │ └── CloudAppInterface.php │ │ └── Exceptions │ │ │ └── FileUploadException.php │ └── Auth │ │ ├── Enums │ │ └── ExceptionMessages.php │ │ ├── Helpers │ │ └── auth.php │ │ └── Contracts │ │ ├── AuthenticatableInterface.php │ │ └── AuthServiceInterface.php ├── Http │ ├── Exceptions │ │ └── HttpException.php │ └── Enums │ │ └── ContentType.php ├── Renderer │ ├── Exceptions │ │ └── RendererException.php │ └── Contracts │ │ └── TemplateRendererInterface.php ├── Service │ ├── Exceptions │ │ └── ServiceException.php │ ├── QtService.php │ └── Helpers │ │ └── service.php ├── Console │ └── Contracts │ │ └── CommandInterface.php ├── Loader │ └── Exceptions │ │ └── LoaderException.php ├── Middleware │ ├── Enums │ │ └── ExceptionMessages.php │ ├── QtMiddleware.php │ └── Exceptions │ │ └── MiddlewareException.php ├── Environment │ ├── Helpers │ │ ├── env.php │ │ └── server.php │ ├── Enums │ │ ├── ExceptionMessages.php │ │ └── Env.php │ └── Exceptions │ │ └── EnvException.php ├── Paginator │ ├── Enums │ │ ├── ExceptionMessages.php │ │ └── Pagination.php │ └── Exceptions │ │ └── PaginatorException.php ├── View │ ├── Enums │ │ └── ExceptionMessages.php │ ├── RawParam.php │ └── Exceptions │ │ └── ViewException.php ├── Migration │ ├── Enums │ │ └── ExceptionMessages.php │ └── QtMigration.php ├── Di │ └── Enums │ │ └── ExceptionMessages.php ├── Model │ └── Enums │ │ └── ExceptionMessages.php └── Router │ └── Exceptions │ └── RouteControllerException.php ├── .gitignore ├── .scrutinizer.yml ├── phpunit.xml ├── .travis.yml └── LICENSE /tests/_root/journal.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_root/logs/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/_root/shared/store/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_root/cache/data/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/_root/shared/emails/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-architect -------------------------------------------------------------------------------- /src/Module/Templates/DemoWeb/src/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Module/Templates/DemoApi/src/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/post.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/_root/.env.example: -------------------------------------------------------------------------------- 1 | APP_KEY=XYZ1234567890 2 | DEBUG=TRUE 3 | -------------------------------------------------------------------------------- /src/Module/Templates/Toolkit/src/Views/pages/dashboard/index.php.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/_root/shared/config/hooks.php: -------------------------------------------------------------------------------- 1 | 'testing' 5 | ]; -------------------------------------------------------------------------------- /tests/_root/php8fe1.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softberg/quantum-php-core/HEAD/tests/_root/php8fe1.tmp -------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/index.php: -------------------------------------------------------------------------------- 1 |
Hello , this is rendered html view
-------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/index.twig.php: -------------------------------------------------------------------------------- 1 |Hello {{ (name ?? "World") }}, this is rendered twig view
-------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/partial.php: -------------------------------------------------------------------------------- 1 |Hello , this is rendered partial html view
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | /nbproject/* 4 | /tests/_root/shared/store/* 5 | composer.lock 6 | .phpunit.result.cache 7 | -------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/layout.twig.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ view() }} 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/_root/modules/Test/Views/layout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/_root/shared/config/view_cache.php: -------------------------------------------------------------------------------- 1 | 300, 5 | 'cache_dir' => 'cache', 6 | 'minify' => false 7 | ]; 8 | -------------------------------------------------------------------------------- /src/Module/Templates/DefaultApi/src/routes/routes.php.tpl: -------------------------------------------------------------------------------- 1 | get('/', 'MainController', 'index'); 5 | }; -------------------------------------------------------------------------------- /src/Module/Templates/DefaultWeb/src/routes/routes.php.tpl: -------------------------------------------------------------------------------- 1 | get('/', 'MainController', 'index'); 5 | }; -------------------------------------------------------------------------------- /tests/_root/shared/resources/lang/en/custom.php: -------------------------------------------------------------------------------- 1 | 'Learn more', 5 | 'info' => 'Information about the {%1} feature', 6 | 'test' => 'Testing' 7 | ]; -------------------------------------------------------------------------------- /tests/_root/shared/resources/lang/es/custom.php: -------------------------------------------------------------------------------- 1 | 'Aprender más', 5 | 'info' => 'Información sobre la función {%1}', 6 | 'test' => 'Prueba' 7 | ]; -------------------------------------------------------------------------------- /tests/_root/modules/Test/resources/lang/en/custom.php: -------------------------------------------------------------------------------- 1 | 'Learn more', 5 | 'info' => 'Information about the {%1} feature', 6 | 'test' => 'Testing' 7 | ]; -------------------------------------------------------------------------------- /tests/_root/modules/Test/resources/lang/es/custom.php: -------------------------------------------------------------------------------- 1 | 'Aprender más', 5 | 'info' => 'Información sobre la función {%1}', 6 | 'test' => 'Prueba' 7 | ]; -------------------------------------------------------------------------------- /src/Module/Templates/DemoWeb/src/Views/partials/messages/success.php.tpl: -------------------------------------------------------------------------------- 1 |
3 |
--------------------------------------------------------------------------------
/src/App/Config/dependencies.php:
--------------------------------------------------------------------------------
1 | \Quantum\Loader\Loader::class,
5 | \Quantum\Http\Request::class => \Quantum\Http\Request::class,
6 | \Quantum\Http\Response::class => \Quantum\Http\Response::class,
7 | ];
--------------------------------------------------------------------------------
/tests/_root/shared/config/app.php:
--------------------------------------------------------------------------------
1 | 'Quantum PHP Framework',
5 | 'version' => '2.9.5',
6 | 'key' => env('APP_KEY'),
7 | 'base_url' => 'http://localhost',
8 | 'debug' => true,
9 | 'test' => 'Testing',
10 | ];
--------------------------------------------------------------------------------
/tests/_root/shared/config/modules.php:
--------------------------------------------------------------------------------
1 | [
5 | 'prefix' => 'test',
6 | 'enabled' => true,
7 | ],
8 | 'Meme' => [
9 | 'prefix' => 'meme',
10 | 'enabled' => false,
11 | ],
12 | ];
13 |
--------------------------------------------------------------------------------
/tests/_root/shared/config/session.php:
--------------------------------------------------------------------------------
1 | 'native',
5 |
6 | 'native' => [
7 | 'timeout' => 300
8 | ],
9 |
10 | 'database' => [
11 | 'table' => 'sessions',
12 | 'timeout' => 300,
13 | ]
14 | ];
--------------------------------------------------------------------------------
/src/Module/Templates/DemoWeb/src/Views/partials/bubbles.php.tpl:
--------------------------------------------------------------------------------
1 |
6 | Hello Tester, this is rendered html view
', $output); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/Module/Templates/Toolkit/src/routes/routes.php.tpl: -------------------------------------------------------------------------------- 1 | group('auth', function ($route) { 5 | $route->get('/', 'DashboardController', 'index'); 6 | 7 | $route->get('emails', 'EmailsController', 'list'); 8 | $route->get('email/[:any]', 'EmailsController', 'single'); 9 | $route->get('email/delete/[:any]', 'EmailsController', 'delete'); 10 | 11 | $route->get('logs', 'LogsController', 'list'); 12 | $route->get('logs/view', 'LogsController', 'single'); 13 | 14 | $route->get('database', 'DatabaseController', 'list'); 15 | $route->get('database/view', 'DatabaseController', 'single'); 16 | $route->post('database/create', 'DatabaseController', 'create')->middlewares(['UniqueTable']); 17 | $route->post('database/update', 'DatabaseController', 'update'); 18 | $route->get('database/delete', 'DatabaseController', 'delete'); 19 | })->middlewares(['BasicAuth']); 20 | }; -------------------------------------------------------------------------------- /tests/Unit/Renderer/Adapters/TwigAdapterTest.php: -------------------------------------------------------------------------------- 1 | "test", 17 | "method" => "GET", 18 | "controller" => "SomeController", 19 | "action" => "test", 20 | "module" => "Test" 21 | ]); 22 | } 23 | 24 | public function testHtmlAdapterRenderView(): void 25 | { 26 | $adapter = new TwigAdapter(); 27 | 28 | $output = $adapter->render('index.twig', ['name' => 'Tester']); 29 | 30 | $this->assertIsString($output); 31 | 32 | $this->assertSame('Hello Tester, this is rendered twig view
', $output); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/Libraries/Database/Enums/ExceptionMessages.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.9.9 13 | */ 14 | 15 | namespace Quantum\Libraries\Database\Enums; 16 | 17 | use Quantum\App\Enums\ExceptionMessages as BaseExceptionMessages; 18 | 19 | /** 20 | * Class ExceptionMessages 21 | * @package Quantum\Libraries\Database 22 | */ 23 | final class ExceptionMessages extends BaseExceptionMessages 24 | { 25 | const INCORRECT_CONFIG = 'The structure of config is not correct'; 26 | 27 | const NOT_SUPPORTED_OPERATOR = 'The operator `{%1}` is not supported'; 28 | 29 | const TABLE_ALREADY_EXISTS = 'The table `{%1}` is already exists'; 30 | 31 | const TABLE_NOT_EXISTS = 'The table `{%1}` does not exists'; 32 | } -------------------------------------------------------------------------------- /src/Libraries/Storage/Enums/ExceptionMessages.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.9.9 13 | */ 14 | 15 | namespace Quantum\Libraries\Storage\Enums; 16 | 17 | use Quantum\App\Enums\ExceptionMessages as BaseExceptionMessages; 18 | 19 | /** 20 | * Class ExceptionMessages 21 | * @package Quantum\Libraries\Session 22 | */ 23 | final class ExceptionMessages extends BaseExceptionMessages 24 | { 25 | const DIRECTORY_NOT_EXISTS = 'The directory {%1} does not exists.'; 26 | 27 | const DIRECTORY_NOT_WRITABLE = 'The directory {%1} is not writable.'; 28 | 29 | const FILE_ALREADY_EXISTS = 'The file {%1} already exists.'; 30 | 31 | const FILE_TYPE_NOT_ALLOWED = 'The file type `{%1}` is not allowed.'; 32 | } -------------------------------------------------------------------------------- /src/Middleware/Exceptions/MiddlewareException.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.9.9 13 | */ 14 | 15 | namespace Quantum\Middleware\Exceptions; 16 | 17 | use Quantum\Middleware\Enums\ExceptionMessages; 18 | use Quantum\App\Exceptions\BaseException; 19 | 20 | /** 21 | * Class MiddlewareException 22 | * @package Quantum\Exceptions 23 | */ 24 | class MiddlewareException extends BaseException 25 | { 26 | 27 | /** 28 | * @param string $name 29 | * @return MiddlewareException 30 | */ 31 | public static function middlewareNotFound(string $name): MiddlewareException 32 | { 33 | return new static(_message(ExceptionMessages::MIDDLEWARE_NOT_FOUND, [$name]), E_ERROR); 34 | } 35 | } -------------------------------------------------------------------------------- /src/Migration/QtMigration.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.7.0 13 | */ 14 | 15 | namespace Quantum\Migration; 16 | 17 | use Quantum\Libraries\Database\Factories\TableFactory; 18 | 19 | /** 20 | * Class QtMigration 21 | * @package Quantum\Migration 22 | */ 23 | abstract class QtMigration 24 | { 25 | 26 | /** 27 | * Upgrades with the specified migration class 28 | * @param TableFactory|null $tableFactory 29 | */ 30 | abstract public function up(?TableFactory $tableFactory); 31 | 32 | /** 33 | * Downgrades with the specified migration class 34 | * @param TableFactory|null $tableFactory 35 | */ 36 | abstract public function down(?TableFactory $tableFactory); 37 | } -------------------------------------------------------------------------------- /src/Libraries/Asset/Helpers/asset.php: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.9.5 13 | */ 14 | 15 | use Quantum\Libraries\Asset\Exceptions\AssetException; 16 | use Quantum\Libraries\Lang\Exceptions\LangException; 17 | use Quantum\Libraries\Asset\AssetManager; 18 | 19 | /** 20 | * Gets the AssetFactory instance 21 | * @return AssetManager|null 22 | */ 23 | function asset(): ?AssetManager 24 | { 25 | return AssetManager::getInstance(); 26 | } 27 | 28 | /** 29 | * Dumps the assets 30 | * @param string $type 31 | * @return void 32 | * @throws AssetException 33 | * @throws LangException 34 | */ 35 | function assets(string $type): void 36 | { 37 | AssetManager::getInstance()->dump(AssetManager::STORES[$type]); 38 | } -------------------------------------------------------------------------------- /src/Module/Templates/DefaultApi/src/Controllers/OpenApi/OpenApiController.php.tpl: -------------------------------------------------------------------------------- 1 | 10 | * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) 11 | * @link http://quantum.softberg.org/ 12 | * @since 2.9.8 13 | */ 14 | 15 | namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; 16 | 17 | use Quantum\Router\RouteController; 18 | 19 | /** 20 | * Class ApiController 21 | * @package Modules\Api 22 | * @OA\Info( 23 | * title="Quantum API documentation", 24 | * version="2.9.0", 25 | * description=" *Quantum Documentation: https://quantumphp.io/en/docs/v1/overview" 26 | * ), 27 | * @OA\SecurityScheme( 28 | * securityScheme="bearer_token", 29 | * type="apiKey", 30 | * name="Authorization", 31 | * in="header" 32 | * ) 33 | */ 34 | abstract class OpenApiController 35 | { 36 | 37 | } -------------------------------------------------------------------------------- /src/Module/Templates/DemoWeb/src/Views/post/comments.php.tpl: -------------------------------------------------------------------------------- 1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 | 19 |
20 |21 | access_time 22 | 23 |
24 |
6 | 7 | $comment]) ?> 8 | 9 |
10 | 11 | 12 | 13 | 14 | check()): ?> 15 | $post]) ?> 16 | 17 |