Advertisement
Guest User

Phalcon Micro Routing

a guest
Sep 20th, 2013
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Custom;
  4.  
  5. class Handler
  6. {
  7.     public function get()
  8.     {
  9.         // do something
  10.         // NEVER gets here 
  11.     }
  12. }
  13.  
  14. $app = new \Phalcon\Mvc\Micro();
  15.  
  16. $router = $app->getRouter();
  17. $router->add(
  18.     '/',
  19.     'Custom\Handler::get'
  20. );
  21.  
  22. $app->handle();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement