PHPackages                             ap/ap-xml-strategy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. ap/ap-xml-strategy

ActiveLibrary[Templating &amp; Views](/categories/templating)

ap/ap-xml-strategy
==================

XmlStrategy for Zend Framework 2. AP\_XmlStrategy select the Xml Render if the ViewModel is an XmlModel or if the Accept header contains 'application/xml' media type.

314.6k—0%3PHP

Since Nov 14Pushed 12y agoCompare

[ Source](https://github.com/alessandropietrobelli/AP_XmlStrategy)[ Packagist](https://packagist.org/packages/ap/ap-xml-strategy)[ RSS](/packages/ap-ap-xml-strategy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AP\_XmlStrategy
===============

[](#ap_xmlstrategy)

Version 1.0.0 created by Alessandro Pietrobelli

Description
-----------

[](#description)

Like the latest changes on Zend Framework 2.0.4 version, AP\_XmlStrategy select the Xml Render if the ViewModel is an XmlModel or if the Accept header contains "application/xml" media type. Using the new controller plugin **acceptableViewModelSelector()** you can select and set the appropriate ViewModel if Accept header meets criteria you specify

Require
-------

[](#require)

PHP &gt;= 5.3.3

Zend Framework &gt;= 2.0.4

Installation
------------

[](#installation)

### with Composer

[](#with-composer)

Add `"ap/ap-xml-strategy": "dev-master"` to your composer.json file and run `php composer.phar update`.

### with Git submodule

[](#with-git-submodule)

Clone this project to your ```./vendor/`` directory:

```
git submodule add git://github.com/alessandropietrobelli/AP_XmlStrategy.git vendor/AP_XmlStrategy

```

### enable it on your application.config.php file

[](#enable-it-on-your-applicationconfigphp-file)

```
