Пример #1
0
 /**
  * Get config object
  */
 public static function getRoute()
 {
     if (!self::$container['route']) {
         self::$container['route'] = Route::getInstance();
     }
     return self::$container['route'];
 }
Пример #2
0
 /**
  * Route
  */
 protected function route()
 {
     //remove url suffix
     $pathinfo = str_replace(KantFactory::getConfig()->get('url_suffix'), '', $this->parsePathinfo());
     Route::import(KantFactory::getConfig()->get('route'));
     $dispath = Route::check($pathinfo);
     if ($dispath === false) {
         $dispath = Route::parseUrl($pathinfo);
     }
     self::$dispatch = $dispath;
 }
Пример #3
0
<?php

use Kant\Route\Route;
//
Route::get("/a", function () {
    return "Welcome To Kant Framework V2.1";
});