aura/view

Provides an implementation of the TemplateView and TwoStepView patterns, with support for helpers and for closures as templates, using PHP itself as the templating language.

Maintainers

Package info

github.com/auraphp/Aura.View

pkg:composer/aura/view

Transparency log

Statistics

Installs: 161 548

Dependents: 22

Suggesters: 1

Stars: 88

Open Issues: 1

2.4.0 2022-02-05 09:35 UTC

README

Provides an implementation of the TemplateView and TwoStepView patterns using PHP itself as the templating language. It supports both file-based and closure-based templates along with helpers and sections.

It is preceded by systems such as Savant, Zend_View, and Solar_View.

Foreword

Installation

This library requires PHP 8.4 or later. It has no runtime dependencies -- not even an escaper, by design; see Escaping Output.

It is installable and autoloadable via Composer as aura/view.

Alternatively, download a release or clone this repository, then require or include its autoload.php file.

Upgrading from 2.x? See Upgrading from 2.x.

Quality

Scrutinizer Code Quality codecov Continuous Integration

To run the unit tests at the command line, issue composer install and then vendor/bin/phpunit at the package root. This requires Composer to be available as composer.

Static analysis is via PHPStan; composer phpstan runs the suite's level, and src/ is clean at level 9.

This library attempts to comply with PSR-1, PSR-12, and PSR-4.

Community

To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our Google Group, or follow @auraphp on X.

Documentation

This package is fully documented here.