the code in the _showDay() method is for producing a single cell. you would not add any loop to it.
see the following logic for the end of the _showDay() method -
// hard way of testing if the day being displayed is today
$today_day = date("d");
$today_mon = date("m");
$today_yea = date("Y");
$class_day = ($cellContent == $today_day && $this->currentMonth == $today_mon && $this->currentYear == $today_yea ? "calendar_today" : "calendar_days");
// easy way of testing if the day being displayed is today
$today = date('Y-m-d');
$class_day = $this->currentDate == $today ? "calendar_today" : "calendar_days";
// the above logic sets the $class_day to highlight 'today' and $cellContent if the day number should be displayed (currentDate is between the start and end of the month)
// to add highlighting or different cellContent do that here
if(in_array($this->currentDate, $this->highlight_dates))
{
$class_day = "calendar_today"; // uses the existing 'today' css. change as needed
$cellContent = ""; // produce the desired content (link) as needed
}
return '<div class="' . $class_day . '">' . $cellContent . '</div>' . "\r\n";
you would define a class property highlight_dates or a name of your choice as an empty array. if the array is left empty, the code works as is. you would then just assign an array of dates to the hightlight_dates property to cause the additional logic to do its thing.
while you can make this array of values just the day number, here are some reasons to use a full date - you may have an array of holidays or company days off for the entire year or these dates may be event dates. you can just put these values into the array and the code will work. so, for your example of birthdays, you would just need to use the current year in the birth date values to come up with the full date values.