*** Backup Mirror *** The web interface and JSON api for the ConnectedHumber Air Quality Monitoring Project. https://github.com/ConnectedHumber/Air-Quality-Web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.2 KiB

<?php
namespace AirQuality\Repositories;
interface IMeasurementTypeRepository {
/**
* Returns whether the specified type is valid or not.
* @param string $id The id of the type to validate.
* @return bool Whether the specified type name is valid or not.
*/
public function is_valid_type(int $id) : bool;
/**
* Get the id associated with the given short description.
* @param string $short_descr The short description to convert.
* @return int|null The id associated with the specified short description.
*/
public function get_id(string $short_descr);
/**
* Gets the friendly name for the specified type name.
* @param int $id The measurement type id to get the friendly name for.
* @return string The friendly name for the specified type name.
*/
public function get_friendly_name(int $id) : 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.
* @param int $device_id The id of the device to get the reading types for.
* @return string[] A list of device ids.
*/
public function get_types_by_device(int $device_id);
}