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

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

programulin/view
================

1.0.0(8y ago)010PHPPHP &gt;=5.4.0

Since Aug 7Pushed 7y agoCompare

[ Source](https://github.com/programulin/view)[ Packagist](https://packagist.org/packages/programulin/view)[ RSS](/packages/programulin-view/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Класс View.
===========

[](#класс-view)

Простейший класс для подключения шаблонов.

Требования:
-----------

[](#требования)

- PHP 5.4+

Как работать
------------

[](#как-работать)

Создаём объект View, в конструтор передаём абсолютный путь к папке с шаблонами:

```
$v = new Programulin\View(__DIR__ . '/v/');
```

Для получения html из php файла, лежащего в .../v/common/template.php, делаем так:

```
$html = $v->get('common/template');
```

Если в шаблон нужно подставить переменные, передаём их вторым параметром:

```
$params = [
	'title' => 'Заголовок сайта',
	'content' => 'Длинный текст статьи'
];

$html = $v->get('common/template', $params);
```

Теперь можно собирать страницу по кусочкам:

```
// Допустим, мы получили товары из базы данных
$products = [];

// Передаём массив с товарами, получаем html-шаблон с товарами.
$products_html = $v->get('products/table', ['products' => $products]);

// Передаём html товаров как контент в базовый шаблон
echo $v->get('common/template', ['title' => 'Заголовок', 'content' => $products_html]);
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3249d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b81553fa8096deea815e14c899cab0b65398b02e9b7bfd4031168f9a44eb1f9?d=identicon)[programulin](/maintainers/programulin)

---

Top Contributors

[![programulin](https://avatars.githubusercontent.com/u/22643100?v=4)](https://github.com/programulin "programulin (3 commits)")

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.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.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

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

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

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

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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