예제 #1
0
 public static function get($route, $classAction)
 {
     $url = new Route();
     $url->getURL();
     if (in_array($route, self::$register)) {
     } else {
         self::$register[] = $route . "@" . $classAction;
     }
     $init = self::initRoute($route, $classAction);
     //echo $init->url . "<br>";
     //echo $init->generedRoute;
     //self::$register[] =	;
     echo "<pre>";
     //var_dump(self::$register);
     echo "</pre>";
     /*	if( $init->url == $init->generedRoute )
     		{
     			self::run($route, $classAction);
     		}/*
     		/*for($i=0; $i < count($paramsArray); $i++)
     		{
     			if($i == 0)
     			{
     				$params[$paramsArray[$i]] = $paramsArray[$i + 1];
     			}elseif($i%2 == 0)
     			{
     				$params[$paramsArray[$i]] = $paramsArray[$i + 1];
     			}		
     		}*/
     //exit();
 }
예제 #2
0
 public function get($route, $classAction)
 {
     echo "dfsd " . $classAction;
     $init = new RouteRegister();
     $init->route = $route;
     $init->classAction = $classAction;
     $url = $_SERVER['REQUEST_URI'];
     $objRoute = new Route();
     $objRoute->route = $this->route;
     $objRoute->url = $url;
     $generedUrl = $objRoute->getGeneredUrl();
     //$route = '/ma';
     //echo "THIS: " . $this->classAction;
     if ($url == $generedUrl) {
         Route::get($route, $classAction);
     }
 }