Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $di->set('config', $di->lazyNew(Config::class));
- $di->set('pdo', $di->lazy(function () use ($di) {
- $config = $di->get('config');
- if($config->database){
- return $di->lazyNew(PdoPlus::class);
- } else {
- return null;
- }
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement