Example #1
0
 /**
  * 返回当前终级类对象的实例
  *
  * @return object
  */
 public static function get_instance()
 {
     if (self::$push_factory == '') {
         self::$push_factory = new PushFactory();
     }
     return self::$push_factory;
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $application = isset($_GET['application']) && !empty($_GET['application']) ? $_GET['application'] : 'admin';
     if (in_array($application, array('admin', 'special', 'content'))) {
         $this->push = PushFactory::get_instance()->get_api($application);
     } else {
         showmessage(L('not_exists_push'), 'blank');
     }
 }