PHPackages                             lcloss/php-page - 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. lcloss/php-page

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

lcloss/php-page
===============

Page system to use with RainTpl

022PHP

Since Feb 17Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/lcloss/php-page)[ Packagist](https://packagist.org/packages/lcloss/php-page)[ RSS](/packages/lcloss-php-page/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

php-page
========

[](#php-page)

A simple Class to work with RainTpl (Template System)

Getting Started
---------------

[](#getting-started)

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

[](#prerequisites)

You will need a web server and PHP configured. This project is intended to be incorporated into another project, so the minimum prerequisite is the web server and PHP.

### Installing

[](#installing)

Installation with Git:

```
git clone https://github.com/lcloss/php-page.git

```

Instalação com o Composer:

```
composer require lcloss/php-page

```

Running the tests
-----------------

[](#running-the-tests)

### Initial setup

[](#initial-setup)

The default folder for the templates is ../app/views/front. If you want to change the default folder, change the $ tpl\_dir variable in the Page.php file.

In the view folder of your system, create the header.html and footer.html file. For this example, also create the home.html file.

At the end you will have a structure like:

```
app/views/front/src/footer.html
app/views/front/src/header.html
app/views/front/src/home.html

```

In your application, use:

```
use \LCloss\Page\Page;

$page = new Page();
$page->setTpl('home', [
	'title'	 => 'Title of your Project',
	'company' => 'Your company',
]);

```

### Creating a template

[](#creating-a-template)

Create a template called hello.html in your views folder. Type the following code:

```
Hello {$username}!

```

Use as follow:

```
use \LCloss\Page\Page;

$page = new Page();
$page->setTpl('hello', [
	'username'	 => 'Frederico Ferdinando',
]);

```

You will see like this:

```
Hello Frederico Ferdinando!

```

Built With
----------

[](#built-with)

- [RainTpl](https://github.com/feulf/raintpl3) - The template system used

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

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [GitHub](https://github.com/) for versioning. For the versions available, see the [tags on this repository](https://github.com/lcloss/php-page/tags).

Authors
-------

[](#authors)

- **Luciano Closs** - *Initial work* - [LCloss](https://github.com/lcloss)

See also the list of [contributors](https://github.com/lcloss/php-page/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

- This project was inspired by the [Curso Completo de PHP 7](https://www.udemy.com/curso-php-7-online/) from [HCode](https://www.hcode.com.br/)
- This README.md was build from [PurpleBooth README Template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3338044b423a7d652c1788cb6a2247ac01877258d3c16362ac2645ff4de4707?d=identicon)[lcloss](/maintainers/lcloss)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lcloss-php-page/health.svg)

```
[![Health](https://phpackages.com/badges/lcloss-php-page/health.svg)](https://phpackages.com/packages/lcloss-php-page)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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