zeus/facade
最新稳定版本:v1.0.0
Composer 安装命令:
composer require zeus/facade
包简介
the facade and container
README 文档
README
Facade and container
An advanced container and facade architecture, The aim is to automatically bind dependency injections.
to install
composer require zeus/facade
The short code for the using of the following
use Zeus\Facade\AbstractFacade; use Zeus\Facade\Container; require_once 'vendor/autoload.php'; class Login extends AbstractFacade { public static function getFacade(): string { return 'login'; } } $container = new Container(); AbstractFacade::setContainer($container); $container->bind(LoginServiceInterface::class, LoginService::class); $container->bind('login', LoginController::class); echo Login::login('john_doe', 'password123') . PHP_EOL; // "Login successful for john_doe at 2025-03-28 14:30:45"
The fake
use \Zeus\Facade\Tests\stubs\Http; Http::fake('get',function (){ return 'fake'; }) echo Http::get(); //fake
or middleware
Http::middleware(function (string $method,array $parameters,Closure $next){ return $next($method,$parameters); });
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-30