Пример #1
0
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new CPM_Calendar();
     }
     return self::$_instance;
 }
Пример #2
0
 function get_events()
 {
     $events = CPM_Calendar::getInstance()->get_events();
     if ($events) {
         echo json_encode($events);
     } else {
         echo json_encode(array('success' => false));
     }
     exit;
 }