tizipso / beyondh
1.0.2
2021-08-11 03:25 UTC
Requires
- php: >=8.0
- ext-json: *
- hyperf/config: ^2.2
- hyperf/guzzle: ^2.2
- hyperf/http-server: ^2.2
- hyperf/logger: ^2.2
- nesbot/carbon: ^2.51
- pimple/pimple: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^4.5
- swow/swow: dev-develop
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2024-11-11 10:36:27 UTC
README
别样红在线文档
环境要求
- PHP >= 8.0
- Composer
安装
composer require tizipso/beyondh
发布配置
php bin/hyperf.php vendor:publish tizipso/beyondh
配置文件位于
config/autoload/beyondh.php
使用
# $config 不传值,将从配置文件中读取 $config = [ 'url' => '', 'domain' => '', 'app_key' => '', 'channel_key' => '', ]; $beyondh = new BeyondhInterface($config); $request = $beyondh->hotel->GetOrgs(PageIndex: 1);
日志打印到文件
添加以下代码到
config/autoload/logger.php
中
'beyondh' => [ 'handler' => [ 'class' => Monolog\Handler\StreamHandler::class, 'constructor' => [ 'stream' => BASE_PATH . '/runtime/logs/beyondh.log', 'level' => Monolog\Logger::DEBUG, ], ], 'formatter' => [ 'class' => Monolog\Formatter\LineFormatter::class, 'constructor' => [ 'format' => null, 'dateFormat' => 'Y-m-d H:i:s', 'allowInlineLineBreaks' => true, ], ], ],