Improved metric repository for per-db methods. Closes #921

This commit is contained in:
James Brooks
2015-08-30 22:35:16 +01:00
parent 062a16ca5b
commit 7136457b49
9 changed files with 516 additions and 210 deletions
@@ -0,0 +1,36 @@
<?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 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
*
* @return int
*/
public function getPointsForDayInWeek(Metric $metric, $day);
}