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();
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.