[TYPO3-mvc] Inject blogFactory instead of objectManager->get in blog_example
Steffen Müller
typo3 at t3node.com
Wed Apr 20 16:21:23 CEST 2011
Hi.
In the blog_example extension the populateAction() in BlogController uses:
$blogFactory =
$this->objectManager->get('Tx_BlogExample_Domain_Service_BlogFactory');
On the other hand, repository objects are injected:
public function
injectBlogRepository(Tx_BlogExample_Domain_Repository_BlogRepository
$blogRepository) {
$this->blogRepository = $blogRepository;
}
Is there any reason against injecting the blogFactory?
Performance?
Not yet refactored blog_example?
--
cheers,
Steffen
TYPO3 Blog: http://www.t3node.com/
Twitter: http://twitter.com/t3node
More information about the TYPO3-project-typo3v4mvc
mailing list