Skip to content

Instantly share code, notes, and snippets.

@brandonsavage
Created March 7, 2014 18:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save brandonsavage/6c519704332be036a5c4 to your computer and use it in GitHub Desktop.
<?php
// default params for the AbstractModel class
$di->params['Example\Package\AbstractModel'] = array(
'db' => $di->lazyGet('database'),
);
$di->params['Example\Model\MyModel'] = array(
'db' => $di->lazyGet('database'),
'user' => $di->lazyGet('user'),
);
$di->params['Example\Model\ModelFactory'] = array(
'map' => array(
'model' => $di->newFactory('Example\Model\Model'),
'mymodel' => $di->newFactory('Example\Model\MyModel'),
);
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment