public static function getInstance() { if (!self::$_instance) { self::$_instance = new CPM_Calendar(); } return self::$_instance; }
function get_events() { $events = CPM_Calendar::getInstance()->get_events(); if ($events) { echo json_encode($events); } else { echo json_encode(array('success' => false)); } exit; }