church/apollo-client

apollo client for php

1.1 2022-09-20 09:00 UTC

This package is auto-updated.

Last update: 2024-10-21 05:51:58 UTC


README

环境要求

  • php >= 7.4

安装

composer require church/apollo-client

使用

$client = new Client('http://127.0.0.1:8082', 'appid', 'tech.oss', 'app secret');
$result = $client->getFromCache();
$result = $client->getWithoutCache();

//必须在CLI模式下运行
$client->autoPull(['tech.oss', 'tech.baidu', 'tech.sms'], function($configuration) {
    $configuration = json_decode($configuration, true);
    $this->assertTrue(boolval($configuration));
});