1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
12 | abstract class Kohana_Report |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * Get the report. Configuration is in the services-manager under the same name. |
||
17 | * The driver name is named the same as the report name |
||
18 | * |
||
19 | * @param string $report_name |
||
20 | * @return Report |
||
21 | */ |
||
22 | static public function factory($report_name) |
||
28 | |||
29 | protected $_start_date; |
||
30 | protected $_end_date; |
||
31 | protected $_date_template = 'Y-m-d H:i:s'; |
||
32 | |||
33 | function __construct() |
||
39 | |||
40 | /** |
||
41 | * Getter / Setter |
||
42 | * Set the timerange start date, defaults to 1 month ago. Normalizes the date to Y-m-d H:i:s |
||
43 | * |
||
44 | * @param string $start_date |
||
45 | * @return string|$this |
||
46 | */ |
||
47 | public function start_date($start_date = NULL) |
||
57 | |||
58 | /** |
||
59 | * Getter / Setter |
||
60 | * Set the timerange end date, defaults to today. Normalizes the date to Y-m-d H:i:s |
||
61 | * |
||
62 | * @param string $end_date |
||
63 | * @return string|$this |
||
64 | */ |
||
65 | public function end_date($end_date = NULL) |
||
74 | |||
75 | abstract public function total(); |
||
76 | } |
||
77 | |||
78 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.