public function groups()
{
$this->trigger_events('groups');
// run each where that was passed
if (isset($this->_ion_where) && !empty($this->_ion_where))
{
foreach ($this->_ion_where as $where)
{
$this->db->where($where);
}
$this->_ion_where = array();
}
if (isset($this->_ion_limit) && isset($this->_ion_offset))
{
$this->db->limit($this->_ion_limit, $this->_ion_offset);
$this->_ion_limit = NULL;
$this->_ion_offset = NULL;
}
else if (isset($this->_ion_limit))
{
$this->db->limit($this->_ion_limit);
$this->_ion_limit = NULL;
}
// set the order
if (isset($this->_ion_order_by) && isset($this->_ion_order))
{
$this->db->order_by($this->_ion_order_by, $this->_ion_order);
}
$this->response = $this->db->get($this->tables['groups']);
return $this;
}
을 제공하는 네이티브를 사용하는 이온 인증 라이브러리를 사용하는 사용자 정의 곳() 함수 위의 정의 _ion_limit을 사용하는 이유, _ion_offset, _ion_where CI가 이미() -> limit() -> get() 네이티브를 작성할 수있는 선택권을 부여했을 때 자체 private _ion_limit, _ion_offset, _ion_where 개인 속성을 유지하면 워크 플로에 좋은 점이 있습니까? 여기서 어떤 부분을 놓치거나 여기에 어떤 디자인 패턴이 관련되어 있습니까?왜 대신() CI는() 그룹에서 볼 수 있듯이 그것은 나에게 말도 안되는 것 같습니다
아마도 사실, 그것은 SQL 구문을 더 유연하게 만드는 것처럼 보입니다. – user7031