Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 function __construct(&$Calendar)
 {
     parent::__construct($Calendar);
 }
Beispiel #5
0
 /**
  * Constructs Calendar_Decorator_Weekday
  * @param object subclass of Calendar
  * @access public
  */
 function Calendar_Decorator_Weekday(&$Calendar)
 {
     parent::Calendar_Decorator($Calendar);
 }
Beispiel #6
0
 /**
  * Constructs Calendar_Decorator_Textual
  * @param object subclass of Calendar
  * @access public
  */
 function Calendar_Decorator_Textual(&$Calendar)
 {
     parent::Calendar_Decorator($Calendar);
 }
Beispiel #7
0
 /**
  * Constructs Calendar_Decorator_Uri
  * @param object subclass of Calendar
  * @access public
  */
 function Calendar_Decorator_Uri(&$Calendar)
 {
     parent::Calendar_Decorator($Calendar);
 }
Beispiel #8
0
 function DiaryEvent($calendar)
 {
     Calendar_Decorator::Calendar_Decorator($calendar);
 }
Beispiel #9
0
 /**
  * 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);
 }
Beispiel #10
0
 function thisDay()
 {
     return '<b>' . parent::thisDay() . '</b>';
 }
 function testGetValidator()
 {
     $this->mockcal->expectOnce('getValidator', array());
     $Decorator = new Calendar_Decorator($this->mockcal);
     $Decorator->getValidator();
 }
Beispiel #12
0
 /**
  * constructeur
  * @param object $calendar un calendrier
  * @access public
  * @return void
  */
 public function __construct($calendar)
 {
     $this->entries = array();
     Calendar_Decorator::Calendar_Decorator($calendar);
 }
Beispiel #13
0
 function __construct(Calendar $calendar)
 {
     // set the author
     //$this->author = xarUserGetVar('id');
     Calendar_Decorator::Calendar_Decorator($calendar);
 }