wearesho-team / yii2-monitoring-fs
Yii2 文件系统监控
1.0.1
2022-12-02 14:07 UTC
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^6.5.8 || ^7.4.5
- horat1us/yii2-monitoring: ^1.2
- wearesho-team/yii2-filesystem: ^4.2
- yiisoft/yii2: ^2.0.47
Requires (Dev)
- horat1us/yii2-asset-free: ^1.0
- php-mock/php-mock-phpunit: ^2.6.1
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-08-30 01:23:20 UTC
README
安装
composer require wearesho-team/yii2-monitoring-fs
使用
创建 Fs 类的实例并将其放入你的文件系统适配器中。
控制台控制器中的简单使用示例
<?php use Wearesho\Yii\Monitoring; class MonitoringController extends \yii\console\Controller { public function actionIndex() { /** @var \Wearesho\Yii\Filesystem\AdapterInterface $adapter */ $control = new Monitoring\Control\Fs([ 'fs' => $adapter, 'client' => new \GuzzleHttp\Client(), ]); try { $details = $control->execute(); } catch (\Horat1us\Yii\Monitoring\Exception $exception) { $this->stdout($exception->getMessage()); } } }