Пример #1
0
 /**
  * Constructor
  * @since Version 3.5
  * @param int $group_id
  */
 public function __construct($group_id = false)
 {
     try {
         parent::__construct();
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
     if ($group_id) {
         $this->id = $group_id;
         $this->fetch();
     }
 }
Пример #2
0
 /**
  * Constructor
  * @since Version 3.5
  * @param int $groupId
  */
 public function __construct($groupId = null)
 {
     parent::__construct();
     if (!filter_var($groupId, FILTER_VALIDATE_INT)) {
         return;
     }
     $this->id = $groupId;
     $this->fetch();
 }