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

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

fastpress/view
==============

A flexible and intuitive templating engine for PHP, optimized for use with the Fastpress framework. Provides an easy-to-use interface for rendering views, handling layouts, and managing content blocks.

0.1.3(1y ago)067[1 issues](https://github.com/fastpress/view/issues)1MITPHPPHP ^7.4 || ^8.0

Since Feb 15Pushed 1y ago1 watchersCompare

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

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

Fastpress View
==============

[](#fastpress-view)

Fastpress View is a powerful and flexible templating engine for PHP, designed to render views and manage layouts seamlessly within the Fastpress framework.

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

[](#installation)

Use [Composer](https://getcomposer.org/) to install Fastpress View into your project:

```
composer require fastpress/view
```

Methods
-------

[](#methods)

### `render(string $view, array $data = []): self`

[](#renderstring-view-array-data---self)

Renders a view with the given data.

**Parameters:**

- `$view`: The name of the view file.
- `$data`: An array of data to pass to the view.

**Returns:**

- The `View` instance.

### `extend(string $layout): self`

[](#extendstring-layout-self)

Extends a layout.

**Parameters:**

- `$layout`: The name of the layout file.

**Returns:**

- The `View` instance.

### `block(string $name): self`

[](#blockstring-name-self)

Starts a template block.

**Parameters:**

- `$name`: The name of the block.

**Returns:**

- The `View` instance.

### `endBlock(string $name = null): void`

[](#endblockstring-name--null-void)

Ends a template block.

**Parameters:**

- `$name`: The name of the block (optional).

**Returns:**

- `void`

### `content(string $name): void`

[](#contentstring-name-void)

Outputs the content of a template block.

**Parameters:**

- `$name`: The name of the block.

**Returns:**

- `void`

### `share(string $key, mixed $value): self`

[](#sharestring-key-mixed-value-self)

Shares data across all views.

**Parameters:**

- `$key`: The key for the shared data.
- `$value`: The value of the shared data.

**Returns:**

- The `View` instance.

### `e(mixed $value): string`

[](#emixed-value-string)

Escapes HTML special characters in a string.

**Parameters:**

- `$value`: The value to escape.

**Returns:**

- The escaped string.

### `set(string $key, mixed $value = null): void`

[](#setstring-key-mixed-value--null-void)

Sets an application configuration value.

**Parameters:**

- `$key`: The configuration key.
- `$value`: The configuration value.

**Returns:**

- `void`

### `get(string $key): mixed`

[](#getstring-key-mixed)

Gets an application configuration value.

**Parameters:**

- `$key`: The configuration key.

**Returns:**

- The configuration value.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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 ~96 days

Total

4

Last Release

533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8224efc6c85f9ed635239195b886766f000c05d279ba93124dcc361c235efdf7?d=identicon)[samayo](/maintainers/samayo)

---

Top Contributors

[![samayo](https://avatars.githubusercontent.com/u/5304093?v=4)](https://github.com/samayo "samayo (8 commits)")

---

Tags

phptemplatingviewlayoutrenderfastpress

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[eftec/bladeone

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

8208.4M87](/packages/eftec-bladeone)[eftec/bladeonehtml

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

1018.1k5](/packages/eftec-bladeonehtml)[delatbabel/viewpages

Support rendering/view of Laravel pages and templates from a database.

121.4k](/packages/delatbabel-viewpages)

PHPackages © 2026

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