public function get($id, $ignore_cache = false){
        if( empty($this->primary_key) ){
            return null;
        }
        $row = $this->where("{$this->table}.{$this->primary_key} = %d", $id)->get_row('', $ignore_cache);
        if( $row && $this->result_class ){
            return new $this->result_class($row);
        }else{
            return $row;
        }
    }
public function get($id, $ignore_cache = false){
        if( empty($this->primary_key) ){
            return null;
        }
        $row = $this->where("{$this->table}.{$this->primary_key} = %d", $id)->get_row('', $ignore_cache);
        if( $row && $this->result_class ){
            return new $this->result_class($row);
        }else{
            return $row;
        }
    }
public function get ( $ id , $ ignore_cache = false ) { if ( empty ( $ this -> primary_key ) ) { return null ; } $ row = $ this -> where ( "{$this->table}.{$this->primary_key} = %d" , $ id ) -> get_row ( '' , $ ignore_cache ) ; if ( $ row && $ this -> result_class ) { return new $ this -> result_class ( $ row ) ; } else { return $ row ; } }
Get object with primary key

@param int $id
@param bool $ignore_cache
@return mixed|null
Get object with primary key