[TYPO3-mvc] Extbase dispatcher used as a factory?

Christoph Ehscheidt ehscheidt at punkt.de
Wed Mar 17 12:54:35 CET 2010


Hi @ all,

I recently tried to change the persistence manager to a simpler one to connect 
to a external non TYPO3 database. After a lot reading of extbase code I 
started with changing the getPersistenceManager() code by extending the 
default dispatcher.

But, as the dispatcher is referenced in many classes directly by its class 
name and the persistence manager is created through its static methods, there 
is almost no chance to implement some own stuff is this domain (without 
extending almost every single class and reimplementing many methods)

Some examples (Extbase in TYPO 4.3.1 but also seen in the latest trunk):
Tx_Extbase_Persistence_Repository line 81: 
$this->persistenceManager = Tx_Extbase_Dispatcher::getPersistenceManager();

Tx_Extbase_MVC_Controller_ActionController line 260:
$extbaseSettings = Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();

Is there a plan for the future to change this?
I would love to see somthing like a injection of a PersistenceManagerFactory 
maybe defined in a configuration.

Or are there better ideas?
Don't get me wrong, I like extbase a lot. This is just a hint for improving 
the extensibility.

Regards,

Chris


More information about the TYPO3-project-typo3v4mvc mailing list