PHPackages                             divengine/div-ways - 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. [Framework](/categories/framework)
4. /
5. divengine/div-ways

Abandoned → [divengine/ways](/?search=divengine%2Fways)Library[Framework](/categories/framework)

divengine/div-ways
==================

Div PHP Ways

2.5.0(1w ago)24692[3 issues](https://github.com/divengine/ways/issues)GPL-3.0-or-laterPHPPHP &gt;=8.0.0CI passing

Since Jul 4Pushed 1w agoCompare

[ Source](https://github.com/divengine/ways)[ Packagist](https://packagist.org/packages/divengine/div-ways)[ Docs](https://divengine.com/ways)[ RSS](/packages/divengine-div-ways/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (3)Versions (13)Used By (0)

Div PHP Ways
============

[](#div-php-ways)

[![Latest Stable Version](https://camo.githubusercontent.com/51f1d0343afc45c72108f50b0d29f2f2d754a692b3e820246fc88a96dc8fc036/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f776179732f76)](https://packagist.org/packages/divengine/ways)[![Total Downloads](https://camo.githubusercontent.com/9257f7894697310f48939799dff49bcc763c6859671e2da8637754d5c3c82fc8/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f776179732f646f776e6c6f616473)](https://packagist.org/packages/divengine/ways)[![Latest Unstable Version](https://camo.githubusercontent.com/0f34d09bb51788f92b3b93f671055357959f0264737430719596756a855f4fb5/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f776179732f762f756e737461626c65)](https://packagist.org/packages/divengine/ways)[![License](https://camo.githubusercontent.com/06d4e129aa5f5100b88fab908b8b4b7c5cc85e829882aecacf01cebd0ad7d60b/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f776179732f6c6963656e7365)](https://packagist.org/packages/divengine/ways)[![PHP Version Require](https://camo.githubusercontent.com/94ffea14f800cdbd6bb8976b85fbe8e6387280c3526fbe1178d4e26a0305f618/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f776179732f726571756972652f706870)](https://packagist.org/packages/divengine/ways)

Div PHP Ways is a small routing and control-flow library for PHP applications. A "way" is different from a traditional route: it identifies a control point that can execute work, register more control points, exchange data, run hooks, and be called from HTTP, CLI, or directly from PHP code.

Features
--------

[](#features)

- Register closures or class methods as control points.
- Match HTTP and CLI requests with URL arguments.
- Invoke ways directly from application code.
- Attach hooks before include, before run, before output, or after run.
- Guard control points with reusable rules.
- Keep the library easy to embed: one class, one source file.

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

[](#installation)

With Composer:

```
composer require divengine/ways
```

Without Composer, include the class directly:

```
