prom-cms/core
最新稳定版本:v1.2.1
Composer 安装命令:
composer require prom-cms/core
包简介
Core for PromCMS
README 文档
README
This project contains essential parts of PromCMS.
TODOs
- Improve tests
- Add documentation (Partially done)
- Migrate to Doctrine
-
Migrate to illuminate/database models and still use SleekDBCreate SleekDB Adapter into Doctrine - Improve twig rendering
- Improve events
- Provide better international experience
- Add twig function/tags/filters
- Rethink intl on models (should that info be on models itself?)
- Support MySQL in custom models
- Perhaps support Illuminate/Database again by creating package that adds SleekDB as a db driver
FAQ and HOW TOs
What functions/filters/helpers/etc are accessible in Twig?
How can I access services or other objects provided by PromCMS?
Services are stored in PSR Container by PromCMS. In fact, PromCMS sets those objects and subscribes to them internally from the container.
Let's look at this example code that can be placed inside <your app root>/src/bootstrap.php:
use PromCMS\Core\Config; return function (App $app) { // Access PSR container $container = $app->getContainer(); // Now you can access whatever - for example Config! It`s fully "type-safe" ;) $config = $container->get(Config::Class); // Now you can use it normally (this is boolean which has true if current .env does not have environment specified or has development value) echo $config->env->development; }
What services does PromCMS expose?
PromCMS exposes a variety of services and objects that help you with creating your project. Each item has its own documentation page (or even PHPDoc) that you can access by clicking on each item
JWTService::classImageService::classFileService::classLocalizationService::classSchemaService::classRenderingService::classSession::classLogger::class
What possible .env options can I set, how can I access them and what they control?
Every PromCMS should have secrets stored in .env. PromCMS stores known configuration in PromCMS\Core\Config which is accessible through PSR Container (see this section for more)
Known keys
APP_ENV
SECURITY_SESSION_LIFETIME
SECURITY_TOKEN_LIFETIME
APP_DEBUG
MAIL_HOST
MAIL_PORT
MAIL_USER
MAIL_PASS
MAIL_ADDRESS
SYSTEM_LOGGING_PATHNAME
Describes the relative path to where should Logger log.
- type:
string|null - default:
null - example:
SYSTEM_LOGGING_PATHNAME="./.temp/app.log"
统计信息
- 总下载量: 539
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-13