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 2mo 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 49% 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

3455d 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

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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