<?php
namespace My\HelloworldBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class DefaultController extends Controller
{
/**
* @Route("/hello-world.html")
* @Template()
*/
public function indexAction()
{
return array();
}
}
Listing 2.6. Zmodyfikowany plik DefaultController.php
Rozdział 2. Hello, world!