PHPackages                             nezamy/view - 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. nezamy/view

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

nezamy/view
===========

View - Template engine for PHP

v1.0.3(5y ago)10166MITPHPPHP &gt;=5.4.0

Since Jun 3Pushed 5y ago5 watchersCompare

[ Source](https://github.com/nezamy/view)[ Packagist](https://packagist.org/packages/nezamy/view)[ Docs](https://github.com/nezamy/view)[ RSS](/packages/nezamy-view/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

View
====

[](#view)

View - Template engine for PHP

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

[](#installation)

```
composer require nezamy/view

```

Usage
-----

[](#usage)

```
require BASE_PATH.'vendor/autoload.php';
$view = new System\Views\View;
$view->view('home', ['content' => 'Here the content passed from Controller']);
```

Default Options
---------------

[](#default-options)

```
$view = new System\Views\View([
    'path'      => 'views/',
    'theme'     => 'default/',
    'layout'    => 'layout/default.php',
    'render'    => 'default/templates/',
    'cache'     => 'storage/cache',
    'compiler'  => true,
    //===========  echo Compiler
    //escape only
    'contentTags'        => ['{{ ', ' }}'],
    // escape and strip html tags
    'escapedContentTags' => ['{( ', ' )}'],
    //without escape
    'rawTags'            => ['{! ', ' !}']
]);
$view->view('home');
// pass data
$view->view('home', ['contentFromController' => 'The content passed from Controller']);
//OR
$view->view('home', [
    'news' => [
        [
            'title' => 'Hello World',
            'content' => 'Here is some content',
        ],
        [
            'title' => 'Second page',
            'content' => 'Here is some content for second page',
        ]
    ]
]);
```

layout
------

[](#layout)

```

    @section('pageTitle')

@section('content')

@section('scripts')

```

view
----

[](#view-1)

- View file (views/default/home.php)

```
@{
    //create variable outside section
    $this->ViewBag('pageName', 'home page');
}@

@section('pageTitle'){{ $ViewBag['pageName'] }}@end

@section('content')
Hello it`s come from view file
{{ $contentFromController }}
@end

// scripts for this page only
@section('scripts')

@end
```

Views with render
-----------------

[](#views-with-render)

```
// news variable for test, you can pass variables to view
@{
    $news = [
        [
            'title' => 'Hello World',
            'content' => 'Here is some content',
        ],
        [
            'title' => 'Second page',
            'content' => 'Here is some content for second page',
        ]
    ];
}@

@section('content')
    Hello it's come from view file

        @render('block', ['item' => $item])

@end
```

- Render file (views/default/templates/block.php)

```

    {{ $item['title'] }}
    {! $item['content'] !}

```

Disable Layout
--------------

[](#disable-layout)

```
$view = new System\Views\View;
$view->layout(false)->view('home');
// OR in view file i.e home.php
@layout('false')
```

Change Layout
-------------

[](#change-layout)

```
$view = new System\Views\View;
$view->layout('layout/dashboard.php')->view('home');
// OR in view file i.e home.php
@layout('layout/dashboard.php')
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 86.2% 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 ~282 days

Total

4

Last Release

2048d ago

### Community

Maintainers

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

---

Top Contributors

[![nezamy](https://avatars.githubusercontent.com/u/3946147?v=4)](https://github.com/nezamy "nezamy (25 commits)")[![phparab](https://avatars.githubusercontent.com/u/31170891?v=4)](https://github.com/phparab "phparab (4 commits)")

---

Tags

viewjustframework

### Embed Badge

![Health badge](/badges/nezamy-view/health.svg)

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

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[laracasts/presenter

Simple view presenters

8643.4M46](/packages/laracasts-presenter)[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M107](/packages/jenssegers-blade)[backpack/generators

Generate files for laravel projects

3122.6M18](/packages/backpack-generators)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M229](/packages/laminas-laminas-view)[friendsofcake/cakephp-csvview

A CSV View class for CakePHP

1762.5M3](/packages/friendsofcake-cakephp-csvview)

PHPackages © 2026

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