Download the PHP package antonienko/php-template-previewer without Composer
On this page you can find all versions of the php package antonienko/php-template-previewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antonienko/php-template-previewer
More information about antonienko/php-template-previewer
Files in antonienko/php-template-previewer
Package php-template-previewer
Short Description For designers testing their framework views without the working backend code.
License MIT
Informations about the package php-template-previewer
PHP Template Previewer
PHP template previewer for designers testing their framework views without the working backend code.
Originally created for a personal project using the Phalcon PHP framework and its templating system Volt.
Disclaimer:
This is my first composer as well as open source project, so if you see anything that needs improving, don't hesitate and tell me. Read my introduction post
List of implemented frameworks
- Phalcon
Extending the framework support
You can make a request for any framework that you want to use this library into, or even better, make a pull request with your own framework strategy. Just implement the FrameworkStrategies folder as an example.
What's new
v0.2.0
- Added Json file support for the variable files
Installation
Composer
This library is available in packagist.org, you can add it to your project via Composer.
In the "require" section of your composer.json file:
Always up to date (bleeding edge, API not guaranteed stable)
Specific minor version, API stability
If you have any problems with the minimum-stability setting try appending @dev to the version
Sample Usage
Phalcon Framework
DesignController with an action View that gets two parameters: $controller
and $view
, which are the name of the controller and action view that you want to render.
You would call the url like this: http://localhost/designTest/view/controllername/viewname
but you are not restricted to use it in this way
Var files
You pass to the render a class implementing IFileStrategy
initialized with an array of var files. In case of having the same variable defined in two of the var files, the last one will prevail.
The variables are separated in three categories: scalars, arrays and objects.
If you want to get an idea of how the var files work take a look at the test fixtures.
License Information
Lincensed under The MIT License (MIT). See the LICENSE file for more details.