Created
February 1, 2013 08:37
-
-
Save armetiz/4690122 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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