코드이그나이터 기반 PHP 오픈소스 게시판 : 씨아이보드

디비 필드 추가 후에...

  • MacGit
  • 2
  • 2,068
  • 글주소
  • 12-05

안녕하세요


씨아이보드 소스분석 및 수정 중에 있는데 

잘 이해가 안되는 부분이 있어 글 남깁니다.


cb_board 테이블에 

sizing 이란 필드를 추가하였고 // enum('f', 'h');
이를 뷰에서 추출해서 

f , h 에 따른 분기처리를 하려고 했습니다만

희한하게 

다른 필드는 다 들어오는데 

sizing 필드만 변수에 안들어오네요.


분명히 

디비 필드를 가져올 때

select 가 비어있으면

전체를 가져오는 것으로 알고 있는데 ( 코드이그나이터 빌드 클래스 )

왜 이렇게 되는건지 잘 모르겠습니다ㅠㅠㅠ


검색해서 여러 글들을 읽어봤는데

해결을 못하고 있습니다 

혹시 아시는분 계실까요 ? 




============ 추가 질문 드립니다.

public function get_board_list($where = '')
{
$result = $this->get('', '', $where, '', 0, 'brd_order', 'ASC');
// echo "<pre>".var_export($result, true)."</pre>"; // chy
return $result;
}


public function get_one($primary_value = '', $select = '', $where = '')
{
$use_cache = false;
if ($primary_value && empty($select) && empty($where)) {
$use_cache = true;
}
if ($use_cache) {
$cachename = $this->cache_prefix . $primary_value;
if ( ! $result = $this->cache->get($cachename)) {
$result = parent::get_one($primary_value);
$this->cache->save($cachename, $result, $this->cache_time);
}
} else {
$result = parent::get_one($primary_value, $select, $where);
}
// var_dump($result); // chy
return $result;
}
 


위 코드를 보게 되면 

get_board_list 에서 $this->get 을 호출하게 되고

get_one 에서는 parent::get_one 을 호출하게 됩니다


parent::get_one 코드의 경우에는 

부모 ( cb_model ) 에 있는 get 을 호출했다고 이해가 가능한데

위에  $this->get 코드의 경우

부모의 함수를 실행하는 것임에도 ( board_model 클래스에는 get 이란 함수가 없습니다 ) 

왜 $this 를 사용하는 것일까요 ㅠㅠㅠ