PHPDoc and clean-up in user and group models
This commit is contained in:
@@ -8,41 +8,40 @@
|
||||
class Group extends CI_Model {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Calls the parent constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* get
|
||||
* Gets all groups.
|
||||
*
|
||||
* @return object
|
||||
* @return array
|
||||
*/
|
||||
public function get() {
|
||||
return $this->db->get('groups')->result_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* getGroupByID
|
||||
* Gets a specific group.
|
||||
*
|
||||
* @return object
|
||||
* @param string $id
|
||||
* @return array
|
||||
*/
|
||||
public function getGroupByID($id) {
|
||||
$this->db->where('id', $id);
|
||||
return $this->db->get('groups')->row_array();
|
||||
public function getByID($id) {
|
||||
return $this->db->get_where('groups', array('id' => $id))->row_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* getGroupByName
|
||||
* Gets a specific group by it's name.
|
||||
*
|
||||
* @return object
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
public function getGroupByName($name) {
|
||||
$this->db->where('name', $name);
|
||||
return $this->db->get('groups')->row_array();
|
||||
public function getByName($name) {
|
||||
return $this->db->get_where('groups', array('name' => $name))->row_array();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* End of file group.php */
|
||||
|
||||
Reference in New Issue
Block a user