Skip to content

Instantly share code, notes, and snippets.

@armetiz
Created February 1, 2013 08:37
Show Gist options
  • Save armetiz/4690122 to your computer and use it in GitHub Desktop.
Save armetiz/4690122 to your computer and use it in GitHub Desktop.
<?php
namespace Wozbe\AnnonceBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Wozbe\AnnonceBundle\Entity\Property;
class DefaultController extends Controller
{
/**
* @Route("/{id}", name="wozbe_immo_home")
* @ParamConverter("property", class="WozbeAnnonceBundle:Property")
* @Method({"GET", "HEAD"})
* @Template
* @Cache(expires="+2 hours")
*/
public function indexAction(Property $property)
{
var_dump(count($property));
exit;
return array("property" => $property);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment