コード例 #1
0
 /**
  * Initalize the Router
  * match and execute current Route
  */
 public function initialize()
 {
     $lstrRequestedUri = preg_replace('|' . dirname($_SERVER['PHP_SELF']) . '|i', '', $_SERVER['REQUEST_URI']);
     $loRoute = Router::getInstance()->match($lstrRequestedUri);
     $this->executeRoute($loRoute);
 }
コード例 #2
0
<?php

use Libraries\Router;
Router::getInstance()->map('/', array('template' => 'resume.php', 'controller' => 'Resume', 'method' => 'show'));