PHPackages                             razherana/piewpiew - 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. razherana/piewpiew

ActiveLibrary

razherana/piewpiew
==================

Extendable view renderer

v1.0.2(1y ago)19MITPHPPHP &gt;=8.2

Since Apr 13Pushed 1y ago1 watchersCompare

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

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

Piewpiew - PHP View Renderer
============================

[](#piewpiew---php-view-renderer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2cb56546fcc627013a874ac464b58b66d4347af23482033444b90b67af3d1cec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72617a686572616e612f70696577706965772e737667)](https://packagist.org/packages/razherana/piewpiew)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/814a3d202401e11daa5fbc7b8f82a364c890fe407fe2049e79a61fa1db64333e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72617a686572616e612f70696577706965772e737667)](https://packagist.org/packages/razherana/piewpiew/stats)

Description
-----------

[](#description)

Piewpiew is an extendable view renderer for PHP that allows you to compile and render views with different template syntaxes. The library comes with two main compilers:

- **PHP Compiler**: For standard PHP templates
- **HPHP AST Compiler**: For custom templating syntax with special tags like ``, ``, ``, etc.

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

[](#installation)

```
composer require razherana/piewpiew
```

Basic Configuration
-------------------

[](#basic-configuration)

After installation, you need to configure Piewpiew:

1. Copy config.example.php to config.php
2. Configure the view paths and compilation settings:

```
return [
  // The directory where your view files are located
  "folder" => "/path/to/your/views",

  // Where compiled views will be stored
  "compiled" => "/path/to/storage/compiled",

  // Where compilation maps will be stored
  "map" => "/path/to/storage/maps",

  // Set to false in production
  "always_compile" => true
];
```

Basic Usage
-----------

[](#basic-usage)

### Rendering Views

[](#rendering-views)

```
