Revize 70a3df53
Přidáno uživatelem Jakub Vašta před téměř 5 roky(ů)
website/src/Repository/IOpenDataManager.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
namespace App\Repository; |
4 | 4 |
|
5 |
/** |
|
6 |
* interface for database connection management |
|
7 |
* autowired @see website/config/services.yaml and https://symfony.com/doc/current/service_container/autowiring.html. |
|
8 |
*/ |
|
5 | 9 |
interface IOpenDataManager { |
10 |
/** |
|
11 |
* Provides specific dataset information i.e. position, number and other informations depending on data type. |
|
12 |
* |
|
13 |
* @param string $name dataset name |
|
14 |
* @param string $date dataset date in format YYYY-mm-dd |
|
15 |
* @param string $hour dataset hour, number between 0 - 23 |
|
16 |
* |
|
17 |
* @return array with dataset information |
|
18 |
*/ |
|
6 | 19 |
public function getCollectionDataByName($name, $date, $hour); |
7 | 20 |
|
21 |
/** |
|
22 |
* Provides all available data sets types. |
|
23 |
* |
|
24 |
* @return array with avalable datasets names |
|
25 |
*/ |
|
8 | 26 |
public function getAvailableCollections(); |
9 | 27 |
|
28 |
/** |
|
29 |
* Provides available datasets in given date. |
|
30 |
* |
|
31 |
* @param string $date dataset date in format YYYY-mm-dd |
|
32 |
* |
|
33 |
* @return array with available datasets names |
|
34 |
*/ |
|
10 | 35 |
public function getAvailableCollectionsByDay($date); |
11 | 36 |
|
37 |
/** |
|
38 |
* Check if dataset with given name is available for given date. |
|
39 |
* |
|
40 |
* @param string $name dataset name |
|
41 |
* @param string $date dataset date in format YYYY-mm-dd |
|
42 |
* |
|
43 |
* @return bool true if dataset with given name is available in given date otherwise false |
|
44 |
*/ |
|
12 | 45 |
public function isCollectionAvailable($name, $date); |
13 | 46 |
|
47 |
/** |
|
48 |
* Provides dates with at least one available dataset. |
|
49 |
* |
|
50 |
* @return array with dates with at least one available dataset in format YYYY-mm-dd |
|
51 |
*/ |
|
14 | 52 |
public function getDatesWithAvailableCollection(); |
15 | 53 |
|
54 |
/** |
|
55 |
* Provides max value of all locations (data dources) in dataset with given date on given date. |
|
56 |
* |
|
57 |
* @param string $name dataset name |
|
58 |
* @param string $date dataset date in format YYYY-mm-dd |
|
59 |
* |
|
60 |
* @return number max value of all locations (data dources) in dataset with given date on given date |
|
61 |
*/ |
|
16 | 62 |
public function getMaxCollectionNumberAtDay($name, $date); |
17 | 63 |
|
64 |
/** |
|
65 |
* Provides for dataset with given name all locations. |
|
66 |
* |
|
67 |
* @param string $name dataset name |
|
68 |
* |
|
69 |
* @return array with all locations for dataset with given name as [x => lat, y => lng] |
|
70 |
*/ |
|
18 | 71 |
public function getDataSourcePositions($name); |
19 | 72 |
|
73 |
/** |
|
74 |
* Provides last available date for each available dataset type. |
|
75 |
* |
|
76 |
* @return array with last available date for each available dataset type as [collection-type-name => YYYY-mm-dd] |
|
77 |
*/ |
|
20 | 78 |
public function getLastAvailableCollections(); |
21 | 79 |
} |
Také k dispozici: Unified diff
+ Re #8086
+ php refactoring and comments