wearesho-team/yii2-monitoring-fs

Yii2 filesystem monitoring

1.0.1 2022-12-02 14:07 UTC

This package is auto-updated.

Last update: 2024-03-30 00:17:12 UTC


README

Tests & Lint Latest Stable Version Total Downloads codecov

Installation

composer require wearesho-team/yii2-monitoring-fs

Usage

Create instance of Fs class and put in it your filesystem adapter.

Simple usage example in console controller:

<?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());
        }
    }
}

Authors

License