$direction = ($pointer == 'future') ? 1 : -1;
$this->currentDayStart->day += $direction;
- $end = clone($this->currentDayStart);
+ $end = clone $this->currentDayStart;
$end->day += 1;
return new Horde_Date_Span($this->currentDayStart, $end);
$this->currentDayStart->day += $direction * 7;
}
- $end = clone($this->currentDayStart);
+ $end = clone $this->currentDayStart;
$end->day++;
return new Horde_Date_Span($this->currentDayStart, $end);
}
}
$this->currentHourStart->hour += $direction;
- $end = clone($this->currentHourStart);
+ $end = clone $this->currentHourStart;
$end->hour++;
return new Horde_Date_Span($this->currentHourStart, $end);
}
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentMinuteStart->min += $direction;
- $end = clone($this->currentMinuteStart);
+ $end = clone $this->currentMinuteStart;
$end->min++;
return new Horde_Date_Span($this->currentMinuteStart, $end);
}
switch ($pointer) {
case 'future':
- $minuteBegin = clone($this->now);
+ $minuteBegin = clone $this->now;
$minuteEnd = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
break;
case 'past':
$minuteBegin = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
- $minuteEnd = clone($this->now);
+ $minuteEnd = clone $this->now;
break;
case 'none':
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentMonthStart->month += $direction;
- $end = clone($this->currentMonthStart);
+ $end = clone $this->currentMonthStart;
$end->month++;
return new Horde_Date_Span($this->currentMonthStart, $end);
}
$direction = ($pointer == 'future') ? 1 : -1;
if (!$this->secondStart) {
- $this->secondStart = clone($this->now);
+ $this->secondStart = clone $this->now;
$this->secondStart->sec += $direction;
} else {
$this->secondStart += $direction;
}
- $end = clone($this->secondStart);
+ $end = clone $this->secondStart;
$end->sec++;
return new Horde_Date_Span($this->secondStart, $end);
}
{
parent::this($pointer);
- $end = clone($this->now);
+ $end = clone $this->now;
$end->sec++;
return new Horde_Date_Span($this->now, $end);
}
case 'past':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
- $sundayRepeater->now = clone($this->now);
+ $sundayRepeater->now = clone $this->now;
$sundayRepeater->now->day++;
$sundayRepeater->next('past');
$lastSundaySpan = $sundayRepeater->next('past');
$sundayRepeater->now = $this->now;
$lastSundaySpan = $sundayRepeater->next('past');
$thisWeekStart = $lastSundaySpan->begin;
- $thisWeekEnd = clone($thisWeekStart);
+ $thisWeekEnd = clone $thisWeekStart;
$thisWeekEnd->day += 7;
return new Horde_Date_Span($thisWeekStart, $thisWeekEnd);
}
{
$direction = ($pointer == 'future') ? 1 : -1;
$weekend = new self();
- $weekend->now = clone($span->begin);
+ $weekend->now = clone $span->begin;
$start = $weekend->next($pointer)->begin;
$start->day += ($amount - 1) * $direction * 7;
return new Horde_Date_Span($start, $start->add($span->width()));
{
if ($query instanceof Horde_Rdo_Query ||
$query instanceof Horde_Rdo_Query_Literal) {
- $query = clone($query);
+ $query = clone $query;
if (!is_null($mapper)) {
$query->setMapper($mapper);
}
}
$methods = !empty($this->methods) ? $this->methods : @unserialize($prefs->getValue('event_alarms'));
- $start = Util::cloneObject($this->start);
+ $start = clone $this->start;
$start->min -= $this->getAlarm();
if (isset($methods['notify'])) {
$methods['notify']['show'] = array(
function addRequiredMember($vFreebusy)
{
- $this->_requiredMembers[] = Util::cloneObject($vFreebusy);
+ $this->_requiredMembers[] = clone $vFreebusy;
}
function addOptionalMember($vFreebusy)
{
- $this->_optionalMembers[] = Util::cloneObject($vFreebusy);
+ $this->_optionalMembers[] = clone $vFreebusy;
}
function render($day = null)
$eventIds = Kronolith::listEventIds($startDate, $endDate, $calendars, $alarmsOnly);
- $startOfPeriod = Util::cloneObject($startDate);
+ $startOfPeriod = clone $startDate;
$startOfPeriod->hour = $startOfPeriod->min = $startOfPeriod->sec = 0;
- $endOfPeriod = Util::cloneObject($endDate);
+ $endOfPeriod = clone $endDate;
$endOfPeriod->hour = 23;
$endOfPeriod->min = $endOfPeriod->sec = 59;
/* Start searching for recurrences from the day after it
* starts. */
- $next = Util::cloneObject($event->start);
+ $next = clone $event->start;
++$next->mday;
}
while ($next !== false && $next->compareDate($endDate) <= 0) {
if (!$event->recurrence->hasException($next->year, $next->month, $next->mday)) {
/* Add the event to all the days it covers. */
- $nextEnd = Util::cloneObject($next);
+ $nextEnd = clone $next;
$nextEnd->year += $diff[0];
$nextEnd->month += $diff[1];
$nextEnd->mday += $diff[2];
/* Work out what day it starts on. */
if ($event->start->compareDateTime($startOfPeriod) < 0) {
/* It started before the beginning of the period. */
- $eventStart = Util::cloneObject($startOfPeriod);
+ $eventStart = clone $startOfPeriod;
} else {
- $eventStart = Util::cloneObject($event->start);
+ $eventStart = clone $event->start;
}
/* Work out what day it ends on. */
if ($event->end->compareDateTime($endOfPeriod) > 0) {
/* Ends after the end of the period. */
- $eventEnd = Util::cloneObject($event->end);
+ $eventEnd = clone $event->end;
} else {
/* If the event doesn't end at 12am set the end date to the
* current end date. If it ends at 12am and does not end at
$event->end->sec != 0 ||
$event->start->compareDateTime($event->end) == 0 ||
$event->isAllDay()) {
- $eventEnd = Util::cloneObject($event->end);
+ $eventEnd = clone $event->end;
} else {
$eventEnd = new Horde_Date(
array('hour' => 23,
while ($loopDate->compareDateTime($eventEnd) <= 0) {
if (!$event->isAllDay() ||
$loopDate->compareDateTime($eventEnd) != 0) {
- $addEvent = Util::cloneObject($event);
+ $addEvent = clone $event;
/* If this is the start day, set the start time to
* the real start time, otherwise set it to
while ($loopDate->compareDateTime($eventEnd) <= 0) {
if (!$event->isAllDay() ||
$loopDate->compareDateTime($eventEnd) != 0) {
- $addEvent = Util::cloneObject($event);
+ $addEvent = clone $event;
$addEvent->start = $eventStart;
$addEvent->end = $eventEnd;
$results[$loopDate->dateString()][$addEvent->getId()] = $addEvent;
// All day events are easy; store them seperately.
if ($event->isAllDay()) {
- $this->_all_day_events[$cid][] = &Util::cloneObject($event);
+ $this->_all_day_events[$cid][] = clone $event;
++$this->_all_day_rowspan[$cid];
$this->_all_day_maxrowspan = max($this->_all_day_maxrowspan, $this->_all_day_rowspan[$cid]);
} else {
// Initialize this event's vertical span.
$event->rowspan = 0;
- $tmp[] = &Util::cloneObject($event);
+ $tmp[] = clone $event;
}
}
$this->_events = $tmp;