connectholland/uptime-robot-bundle

Symfony 4/5 项目使用的 Uptime Robot 插件

安装: 939

依赖: 0

建议: 0

安全: 0

星标: 1

关注者: 4

分支: 2

类型:symfony-bundle

1.1.1 2020-11-05 09:18 UTC

This package is auto-updated.

Last update: 2023-10-05 17:14:15 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

Symfony 4/5 项目使用的 UptimeRobot 插件

安装

composer require connectholland/uptime-robot-bundle

环境

设置环境变量以连接到 UptimeRobot API。

UPTIMEROBOT_API_KEY=the-api-key

使用方法

自动注入客户端,例如。

<?php

declare(strict_types=1);

namespace App;

use ConnectHolland\UptimeRobotBundle\Api\Client;

class SomeService
{
    private Client $client;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }
    
    public function someMethod()
    {
        $this->client->getMonitors();
    }
}