PHPackages                             simplydi/civiews - 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. simplydi/civiews

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

simplydi/civiews
================

A Simple, Native PHP Templating Engine decoupled from CodeIgniter 4

21PHP

Since Aug 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bharatkumar200/CIViews)[ Packagist](https://packagist.org/packages/simplydi/civiews)[ RSS](/packages/simplydi-civiews/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

CIViews
=======

[](#civiews)

A Simple, Native PHP Templating Engine decoupled from CodeIgniter 4

Usage
-----

[](#usage)

**Writing Templates**: [refer to CI4 docs](https://codeigniter.com/user_guide/outgoing/views.html)

### Example 1:

[](#example-1)

```
$data = [
  'title' => 'Dummy Title'
];

$renderer = new \SimiplyDi\CIViews\Renderer('/path/to/templates/dir');
$renderer->data = $data; // or $renderer->setVar('title', $data['title']);
echo $renderer->render('home');
```

### Example with DI

[](#example-with-di)

**MyController.php**:

```
class MyController
{

    private RendererInterface $renderer;

    public function __construct(RendererInterface $renderer)
    {
        $this->renderer = $renderer;
    }

    public function index(): string
    {
        $this->renderer->data = [
            'title' => 'Welcome to website',
            'content' => 'welcome to website',
        ];

        return $this->renderer->render('home');
    }
}
```

**Dependency Container** (use any container you want). Example:

```
$container = new Container();

$container->bind(RendererInterface::class, function () {
    // pass the templates directory as first param and extension you want to use (optional; defaults to .php)
    return new Renderer(__DIR__ . '/views', '.phtml');
});

$container->bind(MyController::class, function () use ($container) {
    return new MyController($container->resolve(RendererInterface::class));
});
```

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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/e62fc23e7e11617b80edb58e4d3df6722b8fd31c36e97cdc70e21a70631d465e?d=identicon)[bharatkumar200](/maintainers/bharatkumar200)

---

Top Contributors

[![bharatkumar200](https://avatars.githubusercontent.com/u/100014921?v=4)](https://github.com/bharatkumar200 "bharatkumar200 (2 commits)")[![namankumar80510](https://avatars.githubusercontent.com/u/72571211?v=4)](https://github.com/namankumar80510 "namankumar80510 (2 commits)")

### Embed Badge

![Health badge](/badges/simplydi-civiews/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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