mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-18 05:58:18 +01:00
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Cachet.
|
|
*
|
|
* (c) Alt Three Services Limited
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace CachetHQ\Cachet\Repositories\Metric;
|
|
|
|
use CachetHQ\Cachet\Models\Metric;
|
|
|
|
interface MetricInterface
|
|
{
|
|
/**
|
|
* Returns metrics for the last hour.
|
|
*
|
|
* @param \CachetHQ\Cachet\Models\Metric $metric
|
|
* @param int $hour
|
|
* @param int $minute
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getPointsLastHour(Metric $metric, $hour, $minute);
|
|
|
|
/**
|
|
* Returns metrics for a given hour.
|
|
*
|
|
* @param \CachetHQ\Cachet\Models\Metric $metric
|
|
* @param int $hour
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getPointsByHour(Metric $metric, $hour);
|
|
|
|
/**
|
|
* Returns metrics for the week.
|
|
*
|
|
* @param \CachetHQ\Cachet\Models\Metric $metric
|
|
* @param int $day
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getPointsForDayInWeek(Metric $metric, $day);
|
|
}
|