PHPackages                             newclass/via - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. newclass/via

ActiveLibrary[HTTP &amp; Networking](/categories/http)

newclass/via
============

The Php router.

v1.0.0(9y ago)0521MITPHP &gt;=5.4.0

Since Dec 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/newclass-pl/via)[ Packagist](https://packagist.org/packages/newclass/via)[ RSS](/packages/newclass-via/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (1)

README
======

[](#readme)

[![license](https://camo.githubusercontent.com/4a018965bd8c82cecfad8d9c844dcefc678a887eab90cb8965f025467d3da080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626166732f7669612e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4a018965bd8c82cecfad8d9c844dcefc678a887eab90cb8965f025467d3da080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626166732f7669612e7376673f7374796c653d666c61742d737175617265)[![PHP 5.4+](https://camo.githubusercontent.com/4cb8281a28225573129779409c5a37b89b84dcf65c97fb75e966b0aed9bfe73c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e342b2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4cb8281a28225573129779409c5a37b89b84dcf65c97fb75e966b0aed9bfe73c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e342b2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)

What is Via?
------------

[](#what-is-via)

Via is a PHP router. Support for http request, cli and a lot more. Create own rule is very simple by implements interfaces.

Via can be used to develop all kind of websites and scripts.

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

[](#installation)

The best way to install is to use the composer by command:

composer require newclass/via

composer install

Use example
-----------

[](#use-example)

```
use Via\Action\HTTPAction;
use Via\Action\HTTPRequest;
use Via\Router;

$router=new Router();

$router->addAction(new HTTPAction('/users','get'),new YourDispatcher('users')); //YourDispatcher create by implements Via\Dispatcher interface
$router->addAction(new HTTPAction('/users/{id}.json','post'),new YourDispatcher());

try{
    $dispatcher=$router->createDispatcher(new HTTPRequest('/users/1232.json','post'));
    $dispatcher->execute();
} catch(RouteNotFoundException $e){
    header("HTTP/1.0 404 Not Found");
}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4acb0470eeb89d512ba7302a6184b091c03a433695340e6a4e87e75fe87bdbc6?d=identicon)[newclass-pl](/maintainers/newclass-pl)

---

Top Contributors

[![michaljantomczak](https://avatars.githubusercontent.com/u/24293672?v=4)](https://github.com/michaljantomczak "michaljantomczak (6 commits)")[![Darez](https://avatars.githubusercontent.com/u/2943972?v=4)](https://github.com/Darez "Darez (1 commits)")

### Embed Badge

![Health badge](/badges/newclass-via/health.svg)

```
[![Health](https://phpackages.com/badges/newclass-via/health.svg)](https://phpackages.com/packages/newclass-via)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M81](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M89](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
