rde/provider

服務註冊

dev-master 2014-10-17 08:50 UTC

This package is not auto-updated.

Last update: 2024-11-05 04:54:54 UTC


README

實驗用 (參考自illuminate)

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

使用

製作一個service provider

class

class MyService extends Rde\Provider
{
    public function register()
    {
        $this->app['my.service'] = function($app){
            return new ReadObject;
        };
    }
    
    public function providers()
    {
        return array('my.service');
    }
    
    // if you need...
    public function boot()
    {
        ReadObjectManager::setSomeConfig($this->app['config']['any']);
    }
}