Quantcast
Channel: Live News for Yii Framework
Viewing all articles
Browse latest Browse all 2941

[extension] jamguozhijun/yii2-xmlparser

$
0
0

993323

Yii2 XML Parser

  1. Installation
  2. Usage
  3. License

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


Viewing all articles
Browse latest Browse all 2941

Trending Articles