/** * Wraps the returned calendar objects from fetchAll in the named decorator * @param string name of Decorator class to wrap with * @return array * @access public */ function fetchAll($decorator) { $children = parent::fetchAll(); foreach ($children as $key => $Calendar) { $children[$key] =& new $decorator($Calendar); } return $children; }
function __construct(Calendar $calendar) { // set the author //$this->author = xarUserGetVar('id'); Calendar_Decorator::Calendar_Decorator($calendar); $this->cE =& $this->getEngine(); $this->year = $this->calendar->year; $this->month = $this->calendar->month; $this->day = $this->calendar->day; }
function build($events = array()) { // comment the following line out if you want to call "$month->build($selectedDays);" below!! Otherwise you'll get strange results! parent::build(); foreach ($this->calendar->children as $i => $child) { $this->calendar->children[$i] =& new DiaryEvent($this->calendar->children[$i]); } if (count($events) > 0) { $this->setSelection($events); } return true; }
function __construct(&$Calendar) { parent::__construct($Calendar); }
/** * Constructs Calendar_Decorator_Weekday * @param object subclass of Calendar * @access public */ function Calendar_Decorator_Weekday(&$Calendar) { parent::Calendar_Decorator($Calendar); }
/** * Constructs Calendar_Decorator_Textual * @param object subclass of Calendar * @access public */ function Calendar_Decorator_Textual(&$Calendar) { parent::Calendar_Decorator($Calendar); }
/** * Constructs Calendar_Decorator_Uri * @param object subclass of Calendar * @access public */ function Calendar_Decorator_Uri(&$Calendar) { parent::Calendar_Decorator($Calendar); }
function DiaryEvent($calendar) { Calendar_Decorator::Calendar_Decorator($calendar); }
/** * Override the nextMonth method to format the output */ function nextMonth() { $nextStamp = parent::nextMonth(TRUE); // Build the URL for next month return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $nextStamp) . '&m=' . date('n', $nextStamp) . '&d=' . date('j', $nextStamp); }
function thisDay() { return '<b>' . parent::thisDay() . '</b>'; }
function testGetValidator() { $this->mockcal->expectOnce('getValidator', array()); $Decorator = new Calendar_Decorator($this->mockcal); $Decorator->getValidator(); }
/** * constructeur * @param object $calendar un calendrier * @access public * @return void */ public function __construct($calendar) { $this->entries = array(); Calendar_Decorator::Calendar_Decorator($calendar); }
function __construct(Calendar $calendar) { // set the author //$this->author = xarUserGetVar('id'); Calendar_Decorator::Calendar_Decorator($calendar); }