예제 #1
0
 public static function getInstance($config_path = null, $cache_path = null)
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self($config_path, $cache_path);
     }
     return self::$_instance;
 }
예제 #2
0
파일: test.php 프로젝트: Tony-M/tmsRouter
<?php

require_once '../Spyc.php';
require_once '../tmsRouter.php';
$root_path = dirname(__FILE__) . '/demo/';
$router = tmsRouter::getInstance($root_path . 'routing.yml', $root_path . 'routingCache.php');
echo '<a href="' . $router->getRoute('testrout') . '">link</a><hr/>';
echo 'Current route params: <br/><pre>';
print_r($router->findRoute());