Skip to content

Instantly share code, notes, and snippets.

@darraghenright
Last active December 14, 2015 15:58

Revisions

  1. darraghenright revised this gist Mar 7, 2013. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions annotations.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    <?php

    // omitted namespace declaration and imports for brevity

    class HomeController extends Controller
    {
  2. darraghenright created this gist Mar 7, 2013.
    31 changes: 31 additions & 0 deletions annotations.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@

    class HomeController extends Controller
    {
    /**
    * Home page
    *
    * @Route("/", name="home_index")
    * @Secure(roles="ROLE_USER")
    * @Method("get")
    * @Template()
    */
    public function indexAction()
    {
    return array();
    }

    /**
    * Handle form post
    *
    * @Route("/", name="home_form")
    * @Secure(roles="ROLE_USER")
    * @Method("post")
    * @Template()
    */
    public function handleFormAction()
    {
    // implement...

    return array();
    }
    }