PHPackages                             solis/phpview - 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. solis/phpview

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

solis/phpview
=============

PhpView is a simple template engine for php

v0.2.0(8y ago)11.6k1GPL-3.0+PHP

Since Jul 13Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

README
======

[](#readme)

O que é o PhpView
-----------------

[](#o-que-é-o-phpview)

PhpView é um simples mecanismo de gerenciamento de templates html em PHP.

Como instalar?
--------------

[](#como-instalar)

Esse pacote foi estruturado para ser instalado por meio do composer.

```
composer require solis/phpview

```

Como utilizar?
--------------

[](#como-utilizar)

Declare o uso da classe View e utilize seu método estático make

```
use Solis\PhpView\View\View

$view = View::make($name, $data, $path);

```

A chamada ao método estático retorna uma instância de ViewContract que é responsável por renderizar o html como string

```
$view->render();

```

Como Funciona
-------------

[](#como-funciona)

O objeto View é instanciado utilizando o método estático make, qual recebe 3 argumentos:

- $name - nome real do arquivo qual contém o conteúdo html.
- $data - array associativo contendo os dados a serem renderizados na string html.
- $path - caminho para o diretório que contém o respectivo arquivo html.

Uma instancia valida do objeto é demonstrada a seguir

```
$main = View::make('main.html', [
    'title' => 'content to place in a {title} entry in main.html',
    'message' => 'content to place in a {message} entry in main.html'
],  dirname(__FILE__) . "/");

```

O ViewContract utiliza o conceito de anexos para representar outras Views html vinculadas a si. Um anexo (Attachment) contém um array de implementações de ViewContract.

```
$main->setAttachment(Attachment::make([
    View::make('attached.html', [
        'title' => 'content to place in a {title} entry in attached.html',
        'message' => 'content to place in a {message} entry in attached.html'
    ], dirname(__FILE__) . "/")
]));

```

Uma ViewContract utilizada como anexo é renderizada por padrão, porém é possível ocultá-la caso necessário

```
$main->getAttachment()->getEntry('attached.html')->setDraw(false);

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Every ~41 days

Total

3

Last Release

3169d ago

### Community

Maintainers

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

---

Top Contributors

[![realfabecker](https://avatars.githubusercontent.com/u/140275759?v=4)](https://github.com/realfabecker "realfabecker (20 commits)")

### Embed Badge

![Health badge](/badges/solis-phpview/health.svg)

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

###  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)
