extphp/dottp

自定义的 Guzzle 包装器

v0.1.0 2018-11-27 07:53 UTC

This package is auto-updated.

Last update: 2024-08-27 20:37:52 UTC


README

Build Status Latest Stable Version License Total Downloads

围绕 Guzzle 的基本包装器,允许使用点符号读取 API 响应

用法

<?php

use ExtPHP\Dottp\Dottp;

$client = new Dottp();
$response = $client->get('https://api.example.org/api/v1/foo');

echo $response->get('foo.bar');

// or you can use the very simple syntax
echo Dottp::get('https://api.example.org/api/v1/foo')->get('foo.bar');

测试

php vendor/bin/phpunit