bapcat/services 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bapcat/services

最新稳定版本:0.3

Composer 安装命令:

composer require bapcat/services

包简介

README 文档

README

Build Status Coverage Status License

Services

This package provides a controlled boot environment for cross-package dependencies.

Installation

Composer

Composer is the recommended method of installation for BapCat packages.

$ composer require bapcat/services

GitHub

BapCat packages may be downloaded from GitHub.

Features

Registration

The main use for Services is to register IoC bindings.

<?php namespace BapCat\CoolLogger;

use BapCat\CoolLogger\Logger;

use BapCat\Interfaces\Ioc\Ioc;

class LoggingServiceProvider implements ServiceProvider {
  private $ioc;
  
  public function __construct(Ioc $ioc) {
    $this->ioc = $ioc;
  }
  
  public function register() {
    // Make Logger a singleton
    $this->ioc->singleton(Logger::class, Logger::class);
    
    // Bind the bap.log alias to the Logger singleton
    $this->ioc->bind('bap.log', Logger::class);
  }
}

统计信息

  • 总下载量: 530
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 4
  • 推荐数: 4

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2015-08-16