forjix/core
最新稳定版本:0.1.0
Composer 安装命令:
composer require forjix/core
包简介
Forjix Framework core components
README 文档
README
Core components for the Forjix framework including the application container and service providers.
Installation
composer require forjix/core
Components
Application Container
A PSR-11 compatible dependency injection container with auto-wiring support.
use Forjix\Core\Application; $app = new Application(); // Bind a service $app->bind(LoggerInterface::class, FileLogger::class); // Bind a singleton $app->singleton(Database::class, function ($app) { return new Database($app->get(Config::class)); }); // Resolve a service $logger = $app->get(LoggerInterface::class);
Service Providers
Register services and bootstrap application components.
use Forjix\Core\ServiceProvider; class DatabaseServiceProvider extends ServiceProvider { public function register(): void { $this->app->singleton(Database::class, function ($app) { return new Database($app->get(Config::class)); }); } public function boot(): void { // Called after all providers are registered } }
Configuration
use Forjix\Core\Config\Config; $config = new Config('/path/to/config'); $debug = $config->get('app.debug', false); $config->set('app.timezone', 'UTC');
License
GPL-3.0
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-01-05