Index: trunk/extensions/SemanticResultFormats/SRF_ParserFunctions.php |
— | — | @@ -20,13 +20,13 @@ |
21 | 21 | |
22 | 22 | class SRFParserFunctions { |
23 | 23 | |
24 | | - function registerFunctions( $parser ) { |
| 24 | + static function registerFunctions( $parser ) { |
25 | 25 | $parser->setFunctionHook('calendarstartdate', array('SRFParserFunctions','runCalendarStartDate')); |
26 | 26 | $parser->setFunctionHook('calendarenddate', array('SRFParserFunctions','runCalendarEndDate')); |
27 | 27 | return true; |
28 | 28 | } |
29 | 29 | |
30 | | - function languageGetMagic( &$magicWords, $langCode = "en" ) { |
| 30 | + static function languageGetMagic( &$magicWords, $langCode = "en" ) { |
31 | 31 | switch ( $langCode ) { |
32 | 32 | default: |
33 | 33 | $magicWords['calendarstartdate'] = array ( 0, 'calendarstartdate' ); |
— | — | @@ -35,14 +35,14 @@ |
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | |
39 | | - function runCalendarStartDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) { |
| 39 | + static function runCalendarStartDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) { |
40 | 40 | if ($calendar_type == '') $calendar_type = 'month'; |
41 | 41 | list($lower_date, $upper_date, $query_date) = |
42 | 42 | SRFParserFunctions::getBoundaryDates($calendar_type, $calendar_start_day, $calendar_days, $default_year, $default_month, $default_day); |
43 | 43 | return date("Y", $lower_date) . '-' . date("m", $lower_date) . '-' . date("d", $lower_date); |
44 | 44 | } |
45 | 45 | |
46 | | - function runCalendarEndDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) { |
| 46 | + static function runCalendarEndDate(&$parser, $calendar_type = 'month', $calendar_start_day = null, $calendar_days = 7, $default_year = null, $default_month = null, $default_day = null) { |
47 | 47 | if ($calendar_type == '') $calendar_type = 'month'; |
48 | 48 | list($lower_date, $upper_date, $query_date) = |
49 | 49 | SRFParserFunctions::getBoundaryDates($calendar_type, $calendar_start_day, $calendar_days, $default_year, $default_month, $default_day); |