PHPackages                             davewid/owl - 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. davewid/owl

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

davewid/owl
===========

A class based View library for 5.3+

1.2.2(13y ago)323MITPHPPHP &gt;=5.3

Since Jun 19Pushed 13y ago1 watchersCompare

[ Source](https://github.com/daveWid/Owl)[ Packagist](https://packagist.org/packages/davewid/owl)[ Docs](https://github.com/daveWid/Owl)[ RSS](/packages/davewid-owl/feed)WikiDiscussions master Synced 2w ago

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

Owl
===

[](#owl)

Owl is a view library that can interface with different template rendering engines. Owl uses [Mustache](https://github.com/bobthecow/mustache.php) as the default rendering engine. Requires PHP 5.3+.

Installing
----------

[](#installing)

As of version 1.2.x you can now use [Composer](http://getcomposer.org/) to install the Owl library. Owl is hosted on [Packagist](http://packagist.org/packages/davewid/owl)so all you will need to add to the require section of composer.json file is below.

```
"require":{
	....
	"davewid/owl": "1.2.*"
	....
}
```

Alternatively you can visit the [downloads](https://github.com/daveWid/Owl/downloads)page and click on the latest version to grab the files. If you download the files from github you will need to setup autoloading by hand.

PHP-FIG
-------

[](#php-fig)

Owl is in compliance with [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)and [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)

Setup
-----

[](#setup)

The Owl library strives for flexibility in rendering engines and finding files. Unfortunately this flexibility adds a few more steps in the setup process. Below are the two things you can inject, the rendering engine and the file finder.

### Engine

[](#engine)

By default, a Mustache rendering engine is setup. If you would like to use a different engine you can set it with `setEngine`. Your engine will have to implement the `\Owl\Engine` interface. The rendering engine is shared between any view and layout classes you use in a request, so you only need to set the engine once per request.

```
