RequestComments::get PHP Method

get() public method

public get ( $id )
    public function get($id)
    {
        $sth = $this->db->prepare('SELECT * FROM request_comments WHERE id = ?');
        $sth->bindParam(1, $id, PDO::PARAM_INT);
        $sth->execute();
        $comment = $sth->fetch(PDO::FETCH_ASSOC);
        if (!$comment) {
            throw new Exception(L::get("COMMENT_NOT_EXIST"), 404);
        }
        return $comment;
    }