PHPackages                             koolreport/platesphp - 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. koolreport/platesphp

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

koolreport/platesphp
====================

Allow KoolReport to use platesphp template engine to render view

1.0.0(6y ago)015MITPHP

Since Jun 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/koolreport/platesphp)[ Packagist](https://packagist.org/packages/koolreport/platesphp)[ Docs](https://www.koolreport.com)[ RSS](/packages/koolreport-platesphp/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

PlatesPHP
=========

[](#platesphp)

Overview
--------

[](#overview)

Starting from version 4.0.0, KoolReport supports other template engines rather than just its own template view file and `PlatesPhp` is one of them.

Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent Twig template engine and strives to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled template languages, such as Twig or Smarty.

#### Highlight

[](#highlight)

- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Increase code reuse with template layouts and inheritance
- Template folders for grouping templates into namespaces
- Data sharing across templates
- Preassign data to specific templates
- Built-in escaping helpers
- Easy to extend using functions and extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant

You may read more information about Plates PHP in [here](https://platesphp.com/).

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

[](#installation)

#### By downloading .zip file

[](#by-downloading-zip-file)

1. [Download](https://www.koolreport.com/packages/platesphp)
2. Unzip the zip file
3. Copy the folder `platesphp` into `koolreport` folder so that look like below

```
koolreport
├── core
├── platesphp
```

#### By composer

[](#by-composer)

```
composer require koolreport/platesphp

```

Get started
-----------

[](#get-started)

**Step 1:** First create a folder to hold the views

```
project/
├── reports/
│   └── MyReport.php
├── views/
│   └── myreport.phtml
```

**Step 2:** Next, in your `MyReport.php` you initiate platesphp template like this:

```
require_once "../../koolreport/core/autoload.php";

class MyReport extends \koolreport\KoolReport
{
    use \koolreport\platesphp\Engine;

    protected function platesInit()
    {
        return League\Plates\Engine::create(dirname(__FILE__).'/../views');
    }
    ...

}

```

**Step 3:** Create report's view content. In your `myreport.phtml` you can do:

```

    MyReport

```

***Important Note*:** You need to use `$report` variable to refer to the report class, not `$this` as you do when use default Koolreport view file.

**Step 4:** To make the report run and render, you do:

```
//index.php

require_once "MyReport.php";

$report = new MyReport;
$report->run()->render("myreport"); // You need to specify the view you want to render

```

Now your report will run and then use `myreport.phtml` to render the view of report.

**Congrat!**

Resources
=========

[](#resources)

1. [Full documentation](https://www.koolreport.com/docs/platesphp/overview/)
2. [Examples &amp; Demonstration](https://www.koolreport.com/examples)

Support
=======

[](#support)

Please use [our forum](https://www.koolreport.com/forum/topics) if you need support, by this way other people can benefit as well. If the support request need privacy, you may send email to us at .

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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

Unknown

Total

1

Last Release

2540d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a27c60d0b76ca63f2216334e1e7668bff2b75ef9ffcc601855d738f29e17dab?d=identicon)[koolreport](/maintainers/koolreport)

---

Top Contributors

[![tuananhnghiem](https://avatars.githubusercontent.com/u/7497712?v=4)](https://github.com/tuananhnghiem "tuananhnghiem (10 commits)")[![koolreport](https://avatars.githubusercontent.com/u/47791618?v=4)](https://github.com/koolreport "koolreport (1 commits)")

---

Tags

mysql-reporting-toolsphp-reporting-toolsphp-reportsplates-templatesreporting-enginetemplate-enginephptemplate engineData ReportReporting Toolsplatesphp

### Embed Badge

![Health badge](/badges/koolreport-platesphp/health.svg)

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

###  Alternatives

[talesoft/tale-pug

A clean, lightweight and easy-to-use templating engine for PHP based on Pug, formerly Jade

319.4k3](/packages/talesoft-tale-pug)

PHPackages © 2026

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