PHPackages                             journey/views - 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. journey/views

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

journey/views
=============

Lightweight view object for alacarte frameworks

v0.1(11y ago)0110MITPHPPHP &gt;=5.3.0

Since Feb 6Pushed 11y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Simple PHP Views
================

[](#simple-php-views)

What
----

[](#what)

A simple PHP class for creating lightweight renderable views for alacarte PHP frameworks. Template languages certainly have their place, but it turns out PHP is great at printing out strings too!

Usage
-----

[](#usage)

### Installing

[](#installing)

Composer is by far the easiest way to install Views.

```
composer require journey/views ~0.1
```

### Rendering Views

[](#rendering-views)

Creating and using views is easy-easy:

```
// Here's one way:
$view = new Journey\View('template-file', $variables);
echo $view->render();

// Here's another:
$view = Journey\View::make('template-file', $variables);
echo $view->render();

// The quickest
echo Journey\View::make('template-file', $variables);
```

Key value pairs in the $variables array will be extracted for use in the template file. You can also choose to prefix your variables with the `variable_prefix` option. Of course views can easily be nested as well. Here's an example of typical usage:

```
// file: app.php
$view = Journey\View('master');

// ... some application logic
$variables = array(
	'title' => 'Hello World',
	'paragraph' => 'Lorum ipsum...'
);
$view->content = Journey\View::make('page', $variables);
```

```
// file: templates/master.php
DOCTYPE html>

		Example Website

```

```
// file: template/page.php

```

### Configuration

[](#configuration)

Generally you'll want to configure the default values for your entire installation sometime around boot:

```
Journey\View::defaults([
    'templates' => getcwd() . "/templates",
    'extension' => '.php',
    'variable_prefix' => null,
    'string_template' => false
]);
```

However you can also set per-instance configuration values:

```
// Lets render the file /tmp/temporary-file.php
$view = new Journey\View('temporary-file');
$view->config(['templates' => '/tmp']);
echo $view;
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

4117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db85c379f90173f437183b21df031e20997aaac69c7046fd927c2a3b57663d39?d=identicon)[justin-schroeder](/maintainers/justin-schroeder)

---

Top Contributors

[![justin-schroeder](https://avatars.githubusercontent.com/u/1950463?v=4)](https://github.com/justin-schroeder "justin-schroeder (10 commits)")

---

Tags

templateviewrender

### Embed Badge

![Health badge](/badges/journey-views/health.svg)

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

###  Alternatives

[jenssegers/blade

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

8661.2M109](/packages/jenssegers-blade)[fiskhandlarn/blade

A library for using Laravel Blade templates in WordPress/WordPlate.

365.8k](/packages/fiskhandlarn-blade)

PHPackages © 2026

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