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)0601Apache-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 2w 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

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

3054d 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

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M152](/packages/algolia-algoliasearch-client-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[pontedilana/php-weasyprint

PHP library allowing PDF generation from an url or a html page. Wrapper for Kozea/WeasyPrint.

781.2M17](/packages/pontedilana-php-weasyprint)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M211](/packages/api-platform-metadata)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)

PHPackages © 2026

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