| 12345678910111213141516171819202122232425262728 |
- <?php
- /**
- * @link http://www.yiiframework.com/
- * @copyright Copyright (c) 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
- */
- namespace yii\httpclient;
- use yii\base\Object;
- use yii\helpers\Json;
- /**
- * JsonParser parses HTTP message content as JSON.
- *
- * @author Paul Klimov <klimov.paul@gmail.com>
- * @since 2.0
- */
- class JsonParser extends Object implements ParserInterface
- {
- /**
- * @inheritdoc
- */
- public function parse(Response $response)
- {
- return Json::decode($response->getContent());
- }
- }
|