[TYPO3-50-general] Flow3 MVC and view
Federico Bernardin
federico at bernardin.it
Wed Nov 26 09:50:00 CET 2008
Hi,
I'm studing all FLOW3 framework.
I follow the instructions for creating first flow3 MVC example (Hello
World). The controller works fine, but when I try to call view ($this-
>view->render()), flow3 links F3::FLOW3::MVC::View::EmptyView instead
F3::Demo:View::DefaultView. So I began to debug the code and the
framework register object F3::Demo:View::DefaultView but when
initialize view it tries to create F3::Demo:View::Defaultindex, but
this view doesn't exist.
It's a my mistake or other one?
The controller code is:
namespace F3::Demo::Controller;
class DefaultController extends
F3 ::FLOW3::MVC::Controller::ActionController {
public function indexAction() {
return $this->view->render();
}
}
The view code is:
namespace F3::Demo::View;
class DefaultView extends F3::FLOW3::MVC::View::AbstractView {
public function render() {
return "Hello World!";
}
}
The folders are:
Packages
Demo
Classes
Controller
F3_Demo_Controller_DefaultController.php
View
F3_Demo_View_DefaultView.php
I try to create a view inside a Default folder with name of
F3_Demo_View_Default_DefaultView.php too, bui it doesn't work.
Thanks
Federico
More information about the TYPO3-project-5_0-general
mailing list