PHPackages                             slabphp/display - 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. [Templating &amp; Views](/categories/templating)
4. /
5. slabphp/display

ActiveLibrary[Templating &amp; Views](/categories/templating)

slabphp/display
===============

SlabPHP Display and Templating Library

v0.1.9(8y ago)0591Apache-2.0PHP

Since Feb 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/SlabPHP/display)[ Packagist](https://packagist.org/packages/slabphp/display)[ Docs](https://www.salernolabs.com/slab)[ RSS](/packages/slabphp-display/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (4)Versions (11)Used By (1)

SlabPHP Display and Template Library
====================================

[](#slabphp-display-and-template-library)

This library uses "php" template files to perform lightweight but organized output operations. Files are included in the context of the Template class. Like much SlabPHP this was written a long time ago. It still assumes you might do business logic in your templates even though that's considered bad design. For more information about SlabPHP, please read the documentation in the core library. You may want to consider using something more modern, such as mustache for templating.

A note on security, php template files should be as secure as any other part of your codebase. You need to make sure you are not including template files that you did not author by carefully using correct file system permissions and directory paths. With that said, there is a possibility of loading malicious code if your codebase is compromised. However if your codebase is compromised this library would probably be the least of your worries.

Installation and Usage
----------------------

[](#installation-and-usage)

First include the library

```
composer require slabphp/display

```

Next instantiate and display a template.

```
$template = new \Slab\Display\Template();
$template->setTemplateSearchDirectories(['default'=>__DIR__.'/templates']);

$output = $template->renderTemplate('standard.php', ['name'=>'Sam'], true);

```

As long as the file ~/templates/standard.php exists, it will load it and since the third param is true it will return it to $output; Assuming that file looked like this:

```
Hello there !

```

Then $output would contain "Hello there Sam!"

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Total

10

Last Release

3009d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155974?v=4)[Eric Salerno](/maintainers/ericsalerno)[@ericsalerno](https://github.com/ericsalerno)

---

Top Contributors

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

---

Tags

phpdisplayslabslabphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slabphp-display/health.svg)

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

###  Alternatives

[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)

PHPackages © 2026

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