View rendering core for PHP applications

v1.0.0 2025-09-26 16:00 UTC

This package is auto-updated.

Last update: 2025-09-26 17:21:42 UTC


README

Latest Version on Packagist Total Downloads License Tests

A core for rendering views in PHP applications.

The package itself doesn't contain any engines; they are included in separate packages:

๐Ÿ“ฆ Installation

composer require codemonster-ru/view

๐Ÿš€ Usage

use Codemonster\View\View;
use Codemonster\View\EngineInterface;

class DummyEngine implements EngineInterface {
    public function render(string $view, array $data = []): string {
        return strtoupper($view);
    }
}

$view = new View(['dummy' => new DummyEngine()], 'dummy');

echo $view->render('home'); // => HOME

โœจ Features

  • Engine-agnostic core
  • Support for multiple engines (PhpEngine, SsrEngine, TwigEngine, etc.)
  • Unified EngineInterface interface
  • Easy integration with frameworks (e.g., Annabel)

๐Ÿงช Testing

You can run tests with the command:

composer test

๐Ÿ‘จโ€๐Ÿ’ป Author

Kirill Kolesnikov

๐Ÿ“œ License

MIT