Subtitles::get PHP Method

get() public method

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