Search by

Karel Wintersky's Application µFramework

Package info

github.com/ArrisFramework/Arris

pkg:composer/karelwintersky/arris

Statistics

Installs: 2 750

Dependents: 5

Suggesters: 6

Stars: 1

Open Issues: 7

2.203.0 2026-09-09 18:05 UTC

README

Class collection for some my projects

Sub-packages

The Arris ecosystem is split into separate composer packages; each package is a repository under /var/www.arris/ and ships its own AGENTS.md. Install the ones you need: composer require karelwintersky/<package>.

Core

This package — arris — the framework core itself: App singleton, AppErrorHandler, Hook events, Controllers\AbstractController, global helpers, Core\Dot, PSR-16 compatible cache.

Companion core packages:

  • arris.config — config reader/writer, AppConfig. composer require karelwintersky/arris.config
  • arris.entity — entity types for the framework. composer require karelwintersky/arris.entity
  • arris.entity.path — path builder. composer require karelwintersky/arris.entity.path
  • arris.entity.url — URL builder. composer require karelwintersky/arris.entity.url
  • arris.logger — application logger. composer require karelwintersky/arris.logger
  • arris.router — application router. composer require karelwintersky/arris.router
  • arris.cache — cache engine. composer require karelwintersky/arris.cache
  • arris.catcher — exception catcher: error dump with call hierarchy or a safe stub. composer require karelwintersky/arris.catcher
  • arris.presenter — presenter with lazy Smarty wrapper. composer require karelwintersky/arris.presenter

Toolkits

// Добавление в конфиг
App::factory()->addConfig([
    'smarty'    =>  [
        'path_template' =>  self::$path_install->join('templates'),
        'path_cache'    =>  self::$path_install->join('cache')
    ]
]);

Global helpers config() / app()

Helpers config() and app() are not hard-bound to Arris\App — they use the application class registered in the framework. This matters when your project has its own app class extending Arris\App (e.g. App\App): without registration the helpers would build a fresh Arris\App instance instead of touching yours.

Register your class once at bootstrap, before any helper call:

use Arris\App;
use App\App as MyApp;

MyApp::setApplicationClass(MyApp::class);
// ... или как зарегистрированный инстанс-класс
App::setApplicationClass(MyApp::class);

config('database.host');  // теперь читает конфиг MyApp-инстанса
app();                    // возвращает MyApp-инстанс (соблюдение singleton)

The given class must extend Arris\App, otherwise RuntimeException is thrown. If nothing was registered (setApplicationClass() was not called) the helpers fall back to Arris\App.