[TYPO3-mvc] Is it possible to have a model in a subnamespace

Philipp philippwrann at gmx.at
Tue Nov 19 12:33:59 CET 2013


Its just about the Combination of a Model and its Repository i was wondering
And the linking of the Model with its database table

If i place a model inside a subfolder what do i have to adjust?

Should i ignore the subfolder in the namespace and link the model with the autoloader

like

'Vendor\Extension\Domain\Model\Report' => $classesPath.'Domain/Model/Import/Report.php'
'Vendor\Extension\Domain\Repository\ReportRepository' => $classesPath.'Domain/Repository/Import/ReportRepository.php'

or would it be better to have also the namespace extended, make some configurations and skip the autoloader setup

then my model would be

Vendor\Extension\Domain\Model\Import\Report

And i would have to configure the database_tablename to something like
tx_extension_domain_model_import_report

Of course i could just try it but i wanted to know how this is realized the "best" way, how was something like this considred to be solved when the framework was wirtten.


More information about the TYPO3-project-typo3v4mvc mailing list