[TYPO3-50-general] MVC in FLOW3

Bastian Waidelich bastian at typo3.org
Thu Nov 13 13:25:14 CET 2008

Sebastian Kurfürst wrote:

>> I can't use DefaultView in the View/Default Folder because the word
>> Default is not allowed in the namespace [...]

> [...] I guess maybe Bastian can help you out on this issue.

Me? ;)
Well, you're right, reserved keywords 
(http://de3.php.net/manual/en/reserved.php) can't be used as class 
names. They even can't be used as namespace segment unfortunately.
That's why you have to append "Controller" to your class names.

The name pattern for views is: 
"F3::@package::View::@controller at action@format"

So, if you had a default controller with an indexAction(), the 
respective view would be:

namespace F3::YourPackage::View;
class DefaultIndex extends F3::FLOW3::MVC::View::AbstractView

> However, I agree with you that some error message would be nice if you 
> are not in production mode.

Yes, I agree - that one tricked me too!


More information about the TYPO3-project-5_0-general mailing list