Open GoogleCodeExporter opened 9 years ago
Remember to wrap the function in a "function_exists":
<?php
if (!function_exists('with')) {
function with ($obj) {
return $obj;
}
}
?>
Or we could put the function inside the qCal class so that we don't have to
worry
about the function existing:
<?php
class qCal {
public static function with($obj) {
return $obj;
}
}
?>
And then it would look like this:
<?php
$recur = qCal::with(new qCal_DateTime_Recur_Yearly('2012-01-01 10:00pm'))
->addRule(new qCal_DateTime_Recur_Rule_ByMonth(array(4,10)))
->addRule(new qCal_DateTime_Recur_Rule_ByMonthDay(23))
->addRule(new qCal_DateTime_Recur_Rule_ByHour(array(4,8)))
->addRule(new qCal_DateTime_Recur_Rule_ByMinute(30));
foreach ($recur as $recurrence) {
pr($recurrenct->format('Y-m-d H:ia'));
}
?>
Original comment by Luke.Vis...@gmail.com
on 10 Feb 2010 at 4:32
Original issue reported on code.google.com by
Luke.Vis...@gmail.com
on 10 Feb 2010 at 2:02