Blocked::get PHP Method

get() public method

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