定制 forjix/core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-05