public function getCategory( ) { $category = new cbblogsCategoryTable( $this->_db ); if ( ! $category->load( (int) $this->get( 'catid' ) ) ) { return false; } return $category; }
public function getCategory( ) { static $cache = array(); $id = (int) $this->get( 'catid' ); if ( ! isset( $cache[$id] ) ) { $category = new cbblogsCategoryTable( $this->_db ); $category->load( $id ); $cache[$id] = $category; } return $cache[$id]; }