/** * 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(); } }
/** * 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(); }