Air-Quality-Web/logic/Repositories/IMeasurementTypeRepository.php

32 lines
958 B
PHP

<?php
namespace AirQuality\Repositories;
interface IMeasurementTypeRepository {
/**
* Returns whether the specified type is valid or not.
* @param string $type_name The name of the type to validate.
* @return bool Whether the specified type name is valid or not.
*/
public function is_valid_type(string $type_name) : bool;
/**
* Gets the friendly name for the specified type name.
* @param string $type_name The type name to get the friendly name for.
* @return string The friendly name for the specified type name.
*/
public function get_friendly_name(string $type_name) : string;
/**
* Returns all the currently known meeasurement types.
* @return array All the measurement types currently known.
*/
public function get_all_types();
/**
* Gets the all the measurement types ever reported by a given device id.
* @return string[] A list of device ids.
*/
public function get_types_by_device(int $device_id);
}