예제 #1
0
 /**
  * Constructor
  * @since Version 3.6
  * @param int $event_id
  */
 public function __construct($event_id = false)
 {
     parent::__construct();
     /**
      * Record this in the debug log
      */
     Debug::RecordInstance();
     if ($event_id) {
         $this->id = $event_id;
         $this->fetch();
     }
 }
예제 #2
0
 /**
  * Constructor
  * @since Version 3.6
  */
 public function __construct($user_id = false)
 {
     try {
         parent::__construct();
     } catch (Exception $e) {
         throw new \Exception($e->getMessage());
     }
     if (!$user_id) {
         throw new \Exception("No user ID given");
         return false;
     }
     $this->user_id = $user_id;
 }