mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-18 05:58:18 +01:00
53 lines
1.0 KiB
PHP
53 lines
1.0 KiB
PHP
<?php
|
|
|
|
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);
|
|
}
|