Quantcast
Channel: LoneShooter.com » zf2
Viewing all articles
Browse latest Browse all 9

Zend Framework 2 – Invokables vs. Factories vs. Services

$
0
0
Beginners in Zend Framework 2 can see using “strange” config keys such as factories, services and invokables in many configuration files. For example: ... 'invokables' => array( 'Index\Controller\Index' => 'Index\Controller\IndexController', ), ... or ... 'factories' => array( 'Book\Model\BookTable' => function($sm) { $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); $table = new BookTable($dbAdapter); return $table; }, ), ... Here are [...]

Viewing all articles
Browse latest Browse all 9

Trending Articles