PHPackages                             sau/wp\_route - 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. [Templating &amp; Views](/categories/templating)
4. /
5. sau/wp\_route

ActiveLibrary[Templating &amp; Views](/categories/templating)

sau/wp\_route
=============

Simple route and mvc for WordPress)

2.2.0(7y ago)044MITPHPPHP &gt;=7.0

Since Oct 25Pushed 7y agoCompare

[ Source](https://github.com/AkinaySau/wp-route)[ Packagist](https://packagist.org/packages/sau/wp_route)[ Docs](https://github.com/AkinaySau/wp-route)[ RSS](/packages/sau-wp-route/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (17)Used By (0)

wp-route
========

[](#wp-route)

простой роутинг и mvc для WordPress

#### Установка

[](#установка)

```
composer require sau/wp_route

```

\####Регистрация библиотеки роутов Используется экшн `sau_simple_route`. Callback-функция принимает в качестве параметра объект `RouteCollector` из [библиотеки](https://packagist.org/packages/nikic/fast-route)

```
    add_action( 'sau_simple_route', function ( RouteCollector $r ) {
        $r->addRoute( [ 'POST', 'GET' ], '/auth', 'User.logIn' );
        // Регистрация ваших роутов...
    } );
```

Где:

- `[ 'POST', 'GET' ]` - методы при которых есть доступ к роуту в иных случаях 405 ошибка;
- `/auth` - Сам роут по которому откроется страница;
- `User.logIn` - имя класса и метод.

Класс в котором находится метод ожет быть описан двумя способами:

- Название класса который лежит в дирректории темы, в каталоге `controllers`;
- namespace указывающий на класс.

Метод всегда должен возвращать объект класса `Sau\WP\Theme\SimpleRouter\BaseResponse`

На данный момент существует 2 возможных ответа

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~16 days

Total

16

Last Release

2877d ago

Major Versions

1.0.8 → 2.0.02018-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/aebf20696c0962e374ef4d391c179f1ea6c20cf9d4107216ff578bf05ca15b9a?d=identicon)[Sau](/maintainers/Sau)

---

Top Contributors

[![AkinaySau](https://avatars.githubusercontent.com/u/28915095?v=4)](https://github.com/AkinaySau "AkinaySau (30 commits)")

---

Tags

templatesystemwproutesau

### Embed Badge

![Health badge](/badges/sau-wp-route/health.svg)

```
[![Health](https://phpackages.com/badges/sau-wp-route/health.svg)](https://phpackages.com/packages/sau-wp-route)
```

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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