Cachet/app/Repositories/Metric/MetricRepository.php
2015-04-19 08:52:39 +01:00

62 lines
1.2 KiB
PHP

<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Metric;
interface MetricRepository
{
/**
* Returns all models.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function all();
/**
* Returns all metric point models.
*
* @param int $id
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function points($id);
/**
* Create a new model.
*
* @param array $data
*
* @return \Illuminate\Database\Eloquent\Model
*/
public function create(array $data);
/**
* Finds a model by id.
*
* @param int $id
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
*
* @return \Illuminate\Database\Eloquent\Model
*/
public function findOrFail($id);
/**
* Update a model by id.
*
* @param int $id
* @param array $data
*
* @return \Illuminate\Database\Eloquent\Model
*/
public function update($id, array $data);
}