Application
classe Application étends Router (Voir la source)
Propriétés
| protected array | $error_code | Define the functions related to an http code executed if this code is up  | 
                depuis Router | 
| protected array | $middlewares | Define the global middleware  | 
                depuis Router | 
| protected string | $prefix | Define the routing prefix  | 
                depuis Router | 
| protected string | $special_method | depuis Router | |
| protected array | $current | Method Http current.  | 
                depuis Router | 
| protected bool | $auto_csrf | Define the auto csrf check status.  | 
                depuis Router | 
| static protected array | $routes | Route collection.  | 
                depuis Router | 
Méthodes
Set auto CSRF status Note: Disable only you run on test env
Allows to associate a global middleware on an route
Launch a callback function for each HTTP error code.
Match route de tout type de method
Get container
Check if is running on php cli
Launcher of the application
Allows you to enable writing the X-Powered-By header in the answer of the inquiry.
Make the REST API base on route and ressource controller.
Abort application
Build dependance
__invoke
Détails
        dans 
Router à la ligne 106
                            void
    setBaseRoute(string $base_route)
        
    
    Set the base route
        dans 
Router à la ligne 117
                            void
    setAutoCsrf(bool $auto_csrf)
        
    
    Set auto CSRF status Note: Disable only you run on test env
        dans 
Router à la ligne 130
                            Router
    prefix(string $prefix, callable $cb)
        
    
    Add a prefix on the roads
        dans 
Router à la ligne 157
                            Router
    middleware(array $middlewares)
        
    
    Allows to associate a global middleware on an route
        dans 
Router à la ligne 180
                            void
    route(array $definition)
        
    
    Route mapper
        dans 
Router à la ligne 229
                            Router
    any(string $path, callable|string|array $cb)
        
    
    Add a route for
GET, POST, DELETE, PUT, OPTIONS, PATCH
        dans 
Router à la ligne 245
                            Route
    get(string $path, callable|string|array $cb)
        
    
    Add a GET route
        dans 
Router à la ligne 257
                            Route
    post(string $path, callable|string|array $cb)
        
    
    Add a POST route
        dans 
Router à la ligne 279
                            Route
    delete(string $path, callable|string|array $cb)
        
    
    Add a DELETE route
        dans 
Router à la ligne 291
                            Route
    put(string $path, callable|string|array $cb)
        
    
    Add a PUT route
        dans 
Router à la ligne 303
                            Route
    patch(string $path, callable|string|array $cb)
        
    
    Add a PATCH route
        dans 
Router à la ligne 315
                            Route
    options(string $path, callable|string|array $cb)
        
    
    Add a OPTIONS route
        dans 
Router à la ligne 328
                            Router
    code(int $code, callable|array|string $cb)
        
    
    Launch a callback function for each HTTP error code.
When the define code match with response code.
        dans 
Router à la ligne 343
                            Router
    match(array $methods, string $path, callable|string|array $cb)
        
    
    Match route de tout type de method
        dans 
Router à la ligne 412
                    protected        string
    getSpecialMethod()
        
    
    Retrieve the define special method
        dans 
Router à la ligne 422
                    protected        bool
    hasSpecialMethod()
        
    
    Check user define the special method
        dans 
Router à la ligne 432
                            array
    getRoutes()
        
    
    Get the route collection
        
                            Capsule
    getContainer()
        
    
    Get container
        
                            void
    bind(Loader $config)
        
    
    Configuration Association
        
                static            Application
    make(Request $request, Response $response)
        
    
    Build the application
        
                            bool
    isRunningOnCli()
        
    
    Check if is running on php cli
        
                            bool|null
    send()
        
    
    Launcher of the application
        
                            void
    disablePoweredByMention()
        
    
    Allows you to enable writing the X-Powered-By header in the answer of the inquiry.
        
                            Application
    rest(string $url, string|array $controller_name, array $where = [])
        
    
    Make the REST API base on route and ressource controller.
        
                            void
    abort(int $code = 500, string $message = '', array $headers = [])
        
    
    Abort application
        
                            mixed
    container(string|null $name = null, callable|null $callable = null)
        
    
    Build dependance
        
                            mixed
    __invoke(array ...$params)
        
    
    __invoke
This point method on the container system