[TYPO3-mvc] folder structure
Bastian Waidelich
bastian at typo3.org
Wed Jun 30 12:36:42 CEST 2010
Franz Koch wrote:
Hi,
> afaik any php file inside "Classes" will be autoloaded by extbase
That's not completely true. Not _all_ classes will be loaded by default
but they're only loaded when needed (which is a good thing).
So, for the autoloader to work correctly, you'll need to follow some
naming convention. That is:
a class "Tx_MyExtension_Foo" is located in
"myextension/Classes/Foo.php", a class "Tx_MyExtension_Foo_Bar_Baz" in
"myextension/Classes/Foo/Bar/Baz.php" and so on.
Regarding the question of where to put helper classes, you would mostly
either put them into a service class (e.g.
"Tx_MyExtension_Services_SessionService") - as Nikolas stated. Or even
into a dedicated extension so it can easily be used in multiple places.
Good luck
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list