here you have 2 choices:
the dirty way is to make the variable name global in the class function where you need it
the better way is to pass it in the constructor of the class when you create the new object and then the var is accessable from the class...
did that help?