Download the PHP package acelaya/zf2-acyaml without Composer
On this page you can find all versions of the php package acelaya/zf2-acyaml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package zf2-acyaml
AcYaml
This module allows to work with Yaml responses the same way we do with JSON responses. Indeed, this module is pretty simple and is based on built-in JSON rendering classes (View\JsonStrategy
, View\JsonRenderer
and View\JsonModel
) but using Symfony\Yaml instead of Zend\Json
.
Installation
The only supported installation method is composer, however others could work too.
Get composer binary into your project.
curl -s http://getcomposer.org/installer | php
And run this command in order to get this module installed.
php composer.phar require acelaya/zf2-acyaml:~0.1
Finally add the module to your application.config.php
file.
Usage
The module will register a yaml view rendering strategy, so any action returning a YamlModel
(which is very similar to the JsonModel
) will make the response to be in yaml format, including the Content-type
header with value application/x-yaml
.
And that's it. No further configuration is needed. Nice and easy.
All versions of zf2-acyaml with dependencies
symfony/yaml Version ~2.4
zendframework/zend-eventmanager Version ~2.2
zendframework/zend-http Version ~2.2
zendframework/zend-view Version ~2.2
zendframework/zend-servicemanager Version ~2.2
zendframework/zend-stdlib Version ~2.2
zendframework/zend-loader Version ~2.2
zendframework/zend-modulemanager Version ~2.2