PHPackages                             zekiunal/router - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zekiunal/router

ActiveLibrary

zekiunal/router
===============

Lightweight, high-performance PHP router implementation based on fast-route with simple array configuration

02PHP

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zekiunal/router)[ Packagist](https://packagist.org/packages/zekiunal/router)[ RSS](/packages/zekiunal-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Nexus Application Router
========================

[](#nexus-application-router)

This document provides a comprehensive overview of the Nexus Application Router system, a PHP routing library built on top of FastRoute.

Table of Contents
-----------------

[](#table-of-contents)

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)
    - [Basic Configuration](#basic-configuration)
    - [Route Definition](#route-definition)
    - [Handling Requests](#handling-requests)
- [Features](#features)
    - [Event System](#event-system)
    - [Authentication Control](#authentication-control)
    - [Request Validation](#request-validation)
    - [Middleware Support](#middleware-support)
    - [Template Support](#template-support)
- [Architecture](#architecture)
- [API Reference](#api-reference)
- [Examples](#examples)
- [Flow Diagrams](#flow-diagrams)
    - [Request Processing Flow](#request-processing-flow)
    - [Class Diagram](#class-diagram)
    - [Route Structure](#route-structure)
    - [Event System Flow](#event-system-flow)

Overview
--------

[](#overview)

The Nexus Application Router is a flexible, feature-rich routing system designed for PHP applications. It provides:

- URL to controller mapping
- HTTP method routing
- Event system for hooks and extensions
- Middleware support
- Authentication checks
- Request validation
- Response handling
- Template integration

The router leverages FastRoute for efficient route matching and provides additional application-level features like authentication, validation, and template management.

Installation
------------

[](#installation)

```
composer require nexus/application
```

Usage
-----

[](#usage)

### Basic Configuration

[](#basic-configuration)

```
