ScheduleDate_Model Class Reference

Public Member Functions

 BuildDateArray ($date)
 Given something that looks like a date, load up the internal dateArray.
 BuildDate ()
 Generate useful formats from the internal dateArray "Useful" is defined as "both unix timestamp and iso-8601".
 Parse (&$pattern, &$matches)
 Given a string (confusingly called pattern), find date representations therein.
 Explode (&$pattern, $rif, &$field, $needle= ',')
 FIXME: really, no idea.
 GetFirstWeekDay ($day)
 FIXME: no idea.
 GetLastWeekDay ($year, $month, $day, $hour, $minute)
 FIXME: no idea.
 GetLastToken ($field, $pattern, $max)
 FIXME: no idea.
 TransformWeek ($pattern)
 FIXME: no idea.
 CheckPattern (&$pattern, $rif, &$field, $debug=false)
 FIXME: no idea.
 BuildMinute ()
 minute
 BuildHour ()
 hour
 BuildDay ()
 day
 BuildMonth ()
 month
 BuildYear ()
 year
 GetFirstRun ($pattern, $now)
 FIXME: no idea.
 GetLastRun ()
 FIXME: no idea.
 Renew ($pattern, $date, $timecheck)
 FIXME: no idea.
 edit_schedule ($data=false, $id=false)
 Save/update a recurring schedule $data should be an array.
 get_schedule_data ($id=false, $type=false)
 Fetch row(s) from db.
 add_downtime ($data=false, $nagioscmd=false, $start_time=false)
 Send downtime command to nagios.
 delete_schedule ($id=false)
 Delete a scheduled recurring downtime.

Data Fields

 $date = null
 A ISO-8601 date and time representation (with space, not T, that is) of the date.
 $time = null
 A UNIX timestamp representation of of the date.

Detailed Description

Author:
Giuseppe Lucarelli <giu.lucarelli@gmail.com>
See also:
http://www.phpclasses.org

Member Function Documentation

ScheduleDate_Model::BuildDate (  ) 

Generate useful formats from the internal dateArray "Useful" is defined as "both unix timestamp and iso-8601".

Returns:
The unix timestamp represented by the dateArray
ScheduleDate_Model::BuildDateArray ( date  ) 

Given something that looks like a date, load up the internal dateArray.

Parameters:
$date A date in a format parsable by strtotime
ScheduleDate_Model::delete_schedule ( id = false  ) 

Delete a scheduled recurring downtime.

FIXME: why is there no authorization here?

Parameters:
$id ID of the downtime to delete
Returns:
true on success, false otherwise
ScheduleDate_Model::get_schedule_data ( id = false,
type = false 
)

Fetch row(s) from db.

Parameters:
$id int = false
$type string = false
Returns:
array
ScheduleDate_Model::Parse ( &$  pattern,
&$  matches 
)

Given a string (confusingly called pattern), find date representations therein.

Parameters:
$pattern The subject to search
$matches A somewhat rewritten version of the match of a gigantic complicated regex
Returns:
true if there was a match, false otherwise

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 22 Nov 2012 for ninja by  doxygen 1.6.1