public static function EventOrder($a, $b)
{
if (isset($a['start_day']) && isset($b['start_day'])) {
if ($a['start_day'] > $b['start_day']) {
return 1;
}
if ($a['start_day'] < $b['start_day']) {
return -1;
}
}
if (isset($a['weight']) && isset($b['weight'])) {
if ($a['weight'] > $b['weight']) {
return 1;
}
if ($a['weight'] < $b['weight']) {
return -1;
}
}
if (isset($a['start']) && isset($b['start'])) {
if ($a['start'] > $b['start']) {
return 1;
}
if ($a['start'] < $b['start']) {
return -1;
}
}
return 0;
}