Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Drupal\visitors; |
| 4 | |
| 5 | /** |
| 6 | * The Date Range interface. |
| 7 | */ |
| 8 | interface VisitorsDateRangeInterface { |
| 9 | |
| 10 | /** |
| 11 | * One day in seconds. |
| 12 | */ |
| 13 | const ONE_DAY = 86400; |
| 14 | |
| 15 | /** |
| 16 | * Get the period. day, week, month, year, range. |
| 17 | * |
| 18 | * @return string |
| 19 | * The period. day is the default. |
| 20 | */ |
| 21 | public function getPeriod(); |
| 22 | |
| 23 | /** |
| 24 | * Get the start timestamp. |
| 25 | * |
| 26 | * @return int |
| 27 | * The start timestamp. Default is yesterday. |
| 28 | */ |
| 29 | public function getStartTimestamp(); |
| 30 | |
| 31 | /** |
| 32 | * Get the start date. Y-m-d. |
| 33 | * |
| 34 | * @return string |
| 35 | * The start date. Default is yesterday. |
| 36 | */ |
| 37 | public function getStartDate(); |
| 38 | |
| 39 | /** |
| 40 | * Get the end timestamp. |
| 41 | * |
| 42 | * @return int |
| 43 | * The end timestamp. Default is today. |
| 44 | */ |
| 45 | public function getEndTimestamp(); |
| 46 | |
| 47 | /** |
| 48 | * Get the end date. Y-m-d. |
| 49 | * |
| 50 | * @return string |
| 51 | * The end date. Default is today. |
| 52 | */ |
| 53 | public function getEndDate(); |
| 54 | |
| 55 | /** |
| 56 | * A human readable summary of the date range. |
| 57 | * |
| 58 | * @return string |
| 59 | * The summary. |
| 60 | */ |
| 61 | public function getSummary(); |
| 62 | |
| 63 | /** |
| 64 | * Set the period and dates. |
| 65 | * |
| 66 | * @param string $period |
| 67 | * The period. |
| 68 | * @param string $start_date |
| 69 | * The start date. |
| 70 | * @param string $end_date |
| 71 | * The end date. |
| 72 | */ |
| 73 | public function setPeriodAndDates($period, $start_date, $end_date); |
| 74 | |
| 75 | } |