PHPackages                             laasti/views - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. laasti/views

ActiveLibrary[HTTP &amp; Networking](/categories/http)

laasti/views
============

A HTTP Message compatible template engine abstraction.

v0.2.3(9y ago)0180[1 issues](https://github.com/laasti/views/issues)1MITPHPCI failing

Since Feb 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/laasti/views)[ Packagist](https://packagist.org/packages/laasti/views)[ RSS](/packages/laasti-views/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (1)

Laasti/views
============

[](#laastiviews)

A HTTP Message compatible template engine abstraction. Provides a TemplateStream that can be attached to HTTP Message's Response.

Only support PHP and Mustache (bobthecow/mustache.php) templates for the moment, PRs are welcome to add more engines.

Installation
------------

[](#installation)

```
composer require laasti/views

```

Usage
-----

[](#usage)

```
$renderer = new \Laasti\Views\TemplateRenderer;
//You can add many engines to support multiple template types
$renderer->addEngine(new \Laasti\Views\Engines\PlainPhp([/*View directory*/]));
//You can set global data to pass on to all template
$renderer->setData('sitename', 'Hello world!');
//Or you can pass data only to one template
$template = new \Laasti\Views\Template("template-name.php", new \Laasti\Views\Data\ArrayData(['title' => 'Hello world!']));
//attackStream will create a TemplateStream and attach it to the response's body
$response = $renderer->attachStream($response, $template);

//The title and sitename will be available as $title and $sitename in the template
```

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

History
-------

[](#history)

See Github's releases or tags

Credits
-------

[](#credits)

Author: Sonia Marquette (@nebulousGirl)

License
-------

[](#license)

Released under the MIT License. See LICENSE.txt file.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~109 days

Total

5

Last Release

3344d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48bb7fdba3e642d3dc668b9ff03ff949b9043f58096f3c85c13de508b53e7d68?d=identicon)[nebulousGirl](/maintainers/nebulousGirl)

---

Top Contributors

[![nebulousGirl](https://avatars.githubusercontent.com/u/1899256?v=4)](https://github.com/nebulousGirl "nebulousGirl (11 commits)")

---

Tags

httppsrpsr-7messagetemplatingtemplateslaasti

### Embed Badge

![Health badge](/badges/laasti-views/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k728.6M2.5k](/packages/psr-http-factory)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k312.3M931](/packages/symfony-psr-http-message-bridge)[laminas/laminas-diactoros

PSR HTTP Message implementations

548112.0M1.1k](/packages/laminas-laminas-diactoros)[mezzio/mezzio

PSR-15 Middleware Microframework

3913.8M120](/packages/mezzio-mezzio)[psr/http-server-handler

Common interface for HTTP server-side request handler

179109.8M1.1k](/packages/psr-http-server-handler)

PHPackages © 2026

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