PHPackages                             skalar/router - 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. skalar/router

ActiveLibrary[Framework](/categories/framework)

skalar/router
=============

Router component for bitrix

1.5.14(7y ago)185MITPHPPHP &gt;=5.6.0

Since Oct 25Pushed 7y ago3 watchersCompare

[ Source](https://github.com/Expertitltd/router)[ Packagist](https://packagist.org/packages/skalar/router)[ RSS](/packages/skalar-router/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (10)Versions (24)Used By (0)

router
======

[](#router)

Router component for bitrix

use
===

[](#use)

copy vendor/skalar/router/examples/router folder into your namespace (example /local/components/skalar)

configure .htaccess redirects to index.php

call component in index.php: $APPLICATION-&gt;IncludeComponent( "skalar:router", "", \[ 'BASE\_URL' =&gt; '/path' \], false ); example vendor/skalar/router/examples/root/index.php params: BASE\_URL - routing folder (optional) you also add rule to urlrewrite.php array ( 'CONDITION' =&gt; '#^/path/#', 'ID' =&gt; NULL, 'PATH' =&gt; '/path/index.php', 'SORT' =&gt; 90, ),

Routing basic on the components symfony "symfony/http-foundation" and "symfony/routing", for more information read documentation for these packages.

Work with templates .default (or another template).

public
======

[](#public)

Routes configure config/routes.yaml. Controllers must extends Skalar\\Controller\\PublicController and have namespace Skalar\\Controller. They should be located in the folder "controllers". All controller actions receive 2 params: Symfony\\Component\\HttpFoundation\\Request $request and array $state. You can get any request arguments: $request-&gt;get("param"); All controllers return array $state. You can set headers in controller use protected property "headers" - Symfony\\Component\\HttpFoundation\\ResponseHeaderBag. You can set response status use controller method setStatus() By default router response is json. You can override controller the getRender() method. It returns a closure that renders content. Closure get 2 arguments: array $state and string $url, return string content;

middleware
==========

[](#middleware)

Middleware calling before any public controller action. Example in folder middleware. Middleware class must have only one method \_\_invoke(). This method work like controller action.

api
===

[](#api)

api has its own routing. You must extends Skalar\\Routing\\AbstractApi and implement method getRoutes(). Your class must be located in api folder. skalar/router have two implemented APIs: rest and graphQl (Skalar/Api/Rest and Skalar/Api/GraphQl). You can take them as a basis for implementing your APIs.

rest
====

[](#rest)

Work folder rest. All rest controller have two methods get and post. They take 0, 1 or 2 arguments. Use $request-&gt;get('param1') and $request-&gt;get('param2'). Route for rest is like /rest/test/{param1}/ where test is name of controller in lowercase. You can override rest api in the folder api in your class extends Skalar/Api/Rest or directly Skalar\\Routing\\AbstractApi.

graphQl
=======

[](#graphql)

Work folder graphql. Route /graphql/. In folder graphql located two basic type. Another types must be realized as these. Type - is class which extends GraphQL\\Type\\Definition\\ObjectType or another. It must have namespace Skalar\\Type. It include in other type as Skalar\\GraphQL\\Types::catalog() where catalog is name of class type in lowercase. For more information, read the documentation for the package "webonyx/graphql-php" .

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~4 days

Recently: every ~11 days

Total

23

Last Release

2709d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59a600dd40997dc98bf0ff93857196509c0f050b5a6d4aa31f3518f376150879?d=identicon)[skalar](/maintainers/skalar)

---

Top Contributors

[![Expertitltd](https://avatars.githubusercontent.com/u/10497023?v=4)](https://github.com/Expertitltd "Expertitltd (4 commits)")[![wi4er](https://avatars.githubusercontent.com/u/37025930?v=4)](https://github.com/wi4er "wi4er (4 commits)")

---

Tags

bitrixrouting

### Embed Badge

![Health badge](/badges/skalar-router/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M514](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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