<?php

namespace {{ namespace }}\Controller;

{% block use_statements %}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
{% if 'annotation' == format -%}
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
{% endif %}
{% endblock use_statements %}

{% block class_definition %}
class DefaultController extends Controller
{% endblock class_definition %}
{
{% block class_body %}
    {% if 'annotation' == format -%}
    /**
     * @Route("/hello/{name}")
     * @Template()
     */
    {% endif -%}
    public function indexAction($name)
    {
        {% if 'annotation' != format -%}
        return $this->render('{{ bundle }}:Default:index.html.twig', array('name' => $name));
        {%- else -%}
        return array('name' => $name);
        {%- endif %}

    }
{% endblock class_body %}
}
