承接 acelaya/zf2-acyaml 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acelaya/zf2-acyaml

最新稳定版本:v0.1.0

Composer 安装命令:

composer require acelaya/zf2-acyaml

包简介

A Zend Framework 2 module to render yaml responses

README 文档

README

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads License

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.

return array(
    'modules' => array(
        'Application',
        'Acelaya\Yaml' // <- Add this line
    )
);

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.

统计信息

  • 总下载量: 656
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固