Habari\Comment::get_post PHP Method

get_post() private method

Obtain the Post object for the post of this comment
private get_post ( boolean $use_cache = true ) : Post
$use_cache boolean Whether to use the cached version or not. Default to true
return Post a Post object for the post of the current comment
    private function get_post($use_cache = true)
    {
        if (!isset($this->post_object) || !$use_cache) {
            $this->post_object = Posts::get(array('id' => $this->post_id, 'fetch_fn' => 'get_row'));
        }
        return $this->post_object;
    }