rde / provider
服務註冊
dev-master
2014-10-17 08:50 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: ~4
- rde/container: dev-master
This package is not auto-updated.
Last update: 2024-11-05 04:54:54 UTC
README
實驗用 (參考自illuminate)
使用
製作一個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']);
}
}