[TYPO3-mvc] Tx_Extbase_Persistence_Backend::injectStorageBackend() missing

dennis ahrens dennis.ahrens at googlemail.com
Fri Jan 29 13:22:42 CET 2010


Hi List,

i got the request, that i have to query data for a domain model by
asking a php script, that just supports a few parameter combinations.
While searching for a nice place to put the logic in - i decided, that
a special StorageBackend should be the right place (at the moment i
query the php script, but maybe i'll query the oracle DB behind this
php script directly from TYPO3 instead of using this script.)

after doing that i was searching for a nice place to inject my
storageBackend-Instance on runtime. i missed a
injectStorageBackend()-method for the Tx_Extbase_Persistence_Backend.

The method should look like this:

/**
 * Injects the Storage Backend
 *
 * @param Tx_Extbase_Persistence_Storage_BackendInterface $storageBackend
 * @return void
 */
public function
injectStorageBackend(Tx_Extbase_Persistence_Storage_BackendInterface
$storageBackend) {
	$this->storageBackend = $storageBackend;
	$this->qomFactory =
t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_QueryObjectModelFactory',
$storageBackend);
}

Based on this method i wrote two Service-methods provided in my EXT to
switch the StorageBackend from within my Repositories.

Two Questions related to this problem:
 - do you think this is a clean solution to provide another
data-source than the Typo3Db?
 - may i create a ticket for the missing injectStorageBackend()-method
or are there any reasons why this behaviour is not wanted?

regards
Dennis


More information about the TYPO3-project-typo3v4mvc mailing list