定制 archict/core 二次开发

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

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

archict/core

最新稳定版本:v1.1.0

Composer 安装命令:

composer require archict/core

包简介

Heart of Archict, this library load and manage Bricks

README 文档

README

Tests

In the Land of PHP where the Shadows lie.

One Brick to rule them all, One Brick to find them,

One Brick to bring them all, and in the darkness bind them

In the Land of PHP where the Shadows lie.

Heart of Archict, this library load and manage Bricks.

Usage

<?php

use Archict\Core\Core;
use Archict\Core\Event\EventDispatcher;

$core = Core::build();
// Load Services and Events
$core->load();

// Access to all Services
$manager    = $core->service_manager;
$dispatcher = $manager->get(EventDispatcher::class);
$dispatcher->dispatch(new MyEvent());

That's all!

Please note that if your package is also a Brick, it will scan only src and include directory for Services.

Supplied Services

ServiceManager

With ServiceManager::get(class-string) you can retrieve any Service. But it's better if you use automatic Service injection in your own Service constructor.

EventDispatcher

With EventDispatcher::dispatch(mixed) you can dispatch an Event to all its listeners.

CacheInterface

Implementation of PSR-16 cache system.

统计信息

  • 总下载量: 1.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-18