jamguozhijun/yii2-xmlparser

v1.0.1 2021-11-22 12:18 UTC

This package is auto-updated.

Last update: 2021-11-23 10:50:01 UTC


README

993323

Yii2 XML Parser


An XML request parser just like built-in yii\web\JsonParser.

Installation

The preferred way to install this extension is through composer:

composer require --prefer-dist jamguozhijun/yii2-xmlparser

or

php composer.phar require --prefer-dist jamguozhijun/yii2-xmlparser

Usage

# app/config/main.php (your configuration file)

<?php

return [
    'components' => [
        'request' => [
            'parsers' => [
                'application/xml' => 'jamguozhijun\yii\web\XmlParser',
                'text/xml' => 'jamguozhijun\yii\web\XmlParser',
            ]
        ],
    ],
];

and then:

Yii::$app->request->post();

License

License