PHPackages                             hellointeractiv/asphalte - 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. [API Development](/categories/api)
4. /
5. hellointeractiv/asphalte

ActiveLibrary[API Development](/categories/api)

hellointeractiv/asphalte
========================

A micro-routing library for PHP

2.0.0(9y ago)081MITPHPPHP &gt;=5.3.0

Since Oct 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hellointeractiv/asphalte)[ Packagist](https://packagist.org/packages/hellointeractiv/asphalte)[ Docs](https://github.com/hellointeractiv/asphalte)[ RSS](/packages/hellointeractiv-asphalte/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Asphalte
========

[](#asphalte)

minimal route system class in php Objet

Install
-------

[](#install)

### Composer

[](#composer)

```
composer require hellointeractiv/asphalte

```

### or bower

[](#or-bower)

```
"hellointeractiv/asphalte": "2.0.0"

```

#### Htaccess

[](#htaccess)

```

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

```

#### Install

[](#install-1)

```
require('asphalte.php'); // or require_once("../app/vendor/autoload.php");

$route = new Asphalte;
```

How to use
----------

[](#how-to-use)

```
# Exemple
$result = "";

$result = $route->get('/test', function ($route) {
    return $route;
});

# result return 3 variables in object(stdClass) statut request size and dynamic vars if there is

echo $result->statut;
echo $result->sizetatut;
var_dump($result->request);

#or

$result = $route->match('GET','/test', "base_controler@test");

# result lunch controler-> function if exeist

if($result==""){
    echo "404";
}else{
    echo $result;
}

# variables dynamic

$result = $route->get('/article/:id', function ($route) {
    return $route;
});

echo $result->id;

# return 3 variables in object(stdClass) statut request and dynamic vars
#
# object(stdClass)(3) {
#  ["statut"]=>bool(true),
#  ["request"]=>array(2) {
# 	[0]=>string(7) "article"
#    	[1]=>string(4) "test"
#  },
#  ["size"]=>2,
#  ["id"]=>string(4) "test"
# }

$route->get_map("test/:id");

#object(stdClass) (3) {
#	  ["method"]=>string(3) "get"
#	  ["request"]=>
#	  array(2) {
#	    [0]=>string(4) "test"
#	    [1]=>string(4) "ouoi"
#	  }
#	  ["size"]=>int(2)
# }
#route can be have many vars in array )

if(	$route->get(...

if(	$route->post(...
if(	$route->any(...
```

REST
----

[](#rest)

```
if(	$route->put(...

if(	$route->delete(...
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/e2d9efcc2fd54b27dbfa63235cca586f90fbba79aa7374f622617932e0dadd6a?d=identicon)[hellointeractiv](/maintainers/hellointeractiv)

---

Top Contributors

[![hellointeractiv](https://avatars.githubusercontent.com/u/9683780?v=4)](https://github.com/hellointeractiv "hellointeractiv (64 commits)")

---

Tags

快递100

### Embed Badge

![Health badge](/badges/hellointeractiv-asphalte/health.svg)

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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