<!---
# This file is part of the ChillDev ProxyTemplating bundle.
#
# @author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
# @copyright 2013 © by Rafał Wrzeszcz - Wrzasq.pl.
# @version 0.0.2
# @since 0.0.1
# @package ChillDev\Bundle\ProxyTemplatingBundle
-->

# ChillDev ProxyTemplating bundle

**ChillDevProxyTemplatingBundle** is a **Symfony2 bundle** that allows you to define globaly default templating engine for your system (for bundles that depends on this feature).

[![Build Status](https://travis-ci.org/chilloutdevelopment/ChillDevProxyTemplatingBundle.png)](https://travis-ci.org/chilloutdevelopment/ChillDevProxyTemplatingBundle)

# Installation

This bundle is provided as [Composer package](https://packagist.org/packages/chilldev/proxy-templating-bundle). To install it simply add following dependency definition to your `composer.json` file:

```
"chilldev/proxy-templating-bundle": "dev-master"
```

Replace `dev-master` with different constraint if you want to use specific version.

**Note:** This bundle requires **PHP 5.4**.

# Configuration

In order to use this bundle, load it in your kernel:

```php
<?php

use ChillDev\Bundle\ProxyTemplatingBundle\ChillDevProxyTemplatingBundle;

use Symfony\Component\HttpKernel\Kernel as BaseKernel;

class Kernel extends BaseKernel
{
    public function registerBundles()
    {
        $bundles = [
            new ChillDevProxyTemplatingBundle(),
        ];
    }
}
```

Enabe templating switching:

```yaml
framework:
    templating:
        engines:
            - "twig"
            - "php"
            - "default" # you need to add this engine to your configuration
```

And then configure proxy:

```yaml
chilldev_proxytemplating:
    templating: "php"
```

See [configuration options](https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/tree/master/Resources/doc/configuration.md) for details.

# Usage

**ChillDevProxyTemplatingBundle** doesn't really provide any features. It's just a system-wide proxy templating redirector. All you need to do in order to pass template to proxy is to use it's name as engine, for example by rendering `Bundle:Controller:action.html.default` or by using `@Template(engine="default")` annotation. For more detailed examples see [usage documentation](https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/tree/master/Resources/doc/usage.md).

# Resources

-   [Source documentation](https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/tree/master/Resources/doc/index.md)
-   [GitHub page with API documentation](http://chilloutdevelopment.github.io/ChillDevProxyTemplatingBundle)
-   [Travis CI](https://travis-ci.org/chilloutdevelopment/ChillDevProxyTemplatingBundle)
-   [Issues tracker](https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/issues)
-   [Packagist package](https://packagist.org/packages/chilldev/proxt-templating-bundle)
-   [Chillout Development @ GitHub](https://github.com/chilloutdevelopment)
-   [Chillout Development @ Facebook](http://www.facebook.com/chilldev)
-   [Post on Wrzasq.pl](http://wrzasq.pl/blog/chilldevproxytemplatingbundle-make-your-vendor-bundle-independent-on-templating-engine.html)

# Contributing

Do you want to help improving this project? Simply *fork* it and post a pull request. You can do everything on your own, you don't need to ask if you can, just do all the awesome things you want!

This project is published under [MIT license](https://github.com/chilloutdevelopment/ChillDevProxyTemplatingBundle/LICENSE).

# Authors

**ChillDevProxyTemplatingBundle** is brought to you by [Chillout Development](http://chilldev.pl).

List of contributors:

-   [Rafał "Wrzasq" Wrzeszcz](https://github.com/rafalwrzeszcz) ([wrzasq.pl](http://wrzasq.pl)).
