PHP Classes

File: src/routes.php

Recommend this page to a friend!
  Classes of Nahidul Hasan   Simple PHP Framework Application   src/routes.php   Download  
File: src/routes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP Framework Application
Example MVC application with the Symfony framework
Author: By
Last change:
Date: 6 months ago
Size: 553 bytes
 

Contents

Class file image Download
<?php
use Symfony\Component\Routing;

$routes = new Routing\RouteCollection();

$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array(
   
'year' => null,
   
'_controller' => 'Calendar\Controller\LeapYearController::index',
)));


$routes->add('home', new Routing\Route('/', array(
   
'_controller' => 'API\Controller\HomeController::dashboard',
)));

$routes->add('twitter_search', new Routing\Route('/search/{param}', array(
   
'param' => null,
   
'_controller' => 'API\Controller\APIController::index',
)));


return
$routes;