Download the PHP package zendframework/zend-expressive-twigrenderer without Composer
On this page you can find all versions of the php package zendframework/zend-expressive-twigrenderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zendframework/zend-expressive-twigrenderer
More information about zendframework/zend-expressive-twigrenderer
Files in zendframework/zend-expressive-twigrenderer
Package zend-expressive-twigrenderer
Short Description Twig integration for Expressive
License BSD-3-Clause
Informations about the package zend-expressive-twigrenderer
Twig Integration for Expressive
Repository abandoned 2019-12-31
This repository has moved to mezzio/mezzio-twigrenderer.
Provides Twig integration for Expressive.
Installation
Install this library using composer:
We recommend using a dependency injection container, and typehint against container-interop. We can recommend the following implementations:
- zend-servicemanager:
composer require zendframework/zend-servicemanager
- pimple-interop:
composer require mouf/pimple-interop
- Aura.Di:
composer require aura/di
Twig Extension
The included Twig extension adds support for url generation. The extension is automatically activated if the UrlHelper and ServerUrlHelper are registered with the container.
-
path
: Render the relative path for a given route and parameters. If there is no route, it returns the current path.path
supports optional query parameters and a fragment identifier.By default the current route result is used where applicable. To disable this the
reuse_result_params
option can be set. -
url
: Render the absolute url for a given route and parameters. If there is no route, it returns the current url.url
also supports query parameters and a fragment identifier.By default the current route result is used where applicable. To disable this the
reuse_result_params
option can be set. -
absolute_url
: Render the absolute url from a given path. If the path is empty, it returns the current url. -
asset
Render an (optionally versioned) asset url.To get the absolute url for an asset:
Configuration
If you use the zend-component-installer
the factories are configured automatically for you when requiring this package
with composer. Without the component installer, you need to
include the ConfigProvider
in your
config/config.php
.
Optional configuration can be stored in config/autoload/templates.global.php
.
Documentation
See the Expressive Twig documentation.
All versions of zend-expressive-twigrenderer with dependencies
psr/container Version ^1.0
twig/twig Version ^1.34 || ^2.4 || ^3.0
zendframework/zend-expressive-helpers Version ^5.0
zendframework/zend-expressive-router Version ^3.0
zendframework/zend-expressive-template Version ^2.0