# apollo_php **Repository Path**: vijay_0215/apollo_php ## Basic Information - **Project Name**: apollo_php - **Description**: Apollo的PHP客户端版本,便于快速接入 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-01-15 - **Last Updated**: 2022-06-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # apollo php 客户端 ## 介绍 ## 安装教程 ```shell script composer require dreamcat/apollo-php ``` ## 使用说明 fpm 示例代码 ```php "config.php", "script" => "script.php", ]; $process = new ApolloReadProcess("apollo.cae"); $process->setLogger(new NullLogger()) ->setApolloServer(new ApolloServer("http://config.url.com")) ->setConfigSaver(new SingleSaver($map)) ->readConfig("appid", "cluserName", array_keys($map)); ``` swoole 示例代码 ```php "config.php", "script" => "script.php", ]; $process = new ApolloReadProcess("apollo.cae"); $process->setLogger(new NullLogger()) ->setApolloServer(new ApolloServer("http://config.url.com")) ->setConfigSaver(new SwooleSaver(new SingleSaver($map), "swoole_server.pid")) ->readConfig("appid", "cluserName", array_keys($map)); ```