1: <?php
2: namespace Application\Controller;
3: use Application\Model\Service\Impl\IndexService;
4:
5: class IndexController extends ApplicationController {
6:
7: private $service;
8:
9: public function __construct() {
10: parent::__construct();
11: $this->service = new IndexService();
12: }
13:
14:
15: public function defaultAction($one = "", $two = "") {
16: echo "From Controller";
17:
18: $message = "From View";
19: $this->view->addObject("mesg", "<br />".$message. "<br />".$one."<br />".$two );
20: $this->view->render('index');
21: }
22:
23: public function testFromServiceAction() {
24: $this->view->addObject("mesg", $this->service->testMessage());
25: $this->view->render('index');
26: }
27:
28: public function testFromDAOAction() {
29: $this->view->addObject("mesg", $this->service->messageFromDAO());
30: $this->view->render('index');
31: }
32: }