blink\core\Application::route PHP Method

route() public method

public route ( $method, $route, $handler )
    public function route($method, $route, $handler)
    {
        $this->routes[] = [$method, $route, $handler];
        return $this;
    }

Usage Example

Example #1
0
 protected function createApp($callback = null)
 {
     $app = new Application(['root' => '.', 'services' => ['log' => $this->createLogger($this->logFile)]]);
     if ($callback) {
         $app->route('GET', '/', $callback);
     }
     $app->bootstrap();
     return $app;
 }
All Usage Examples Of blink\core\Application::route