Added set_variable and get_variable methods. Example updated accordingly.

I've added added to methods to your class so you don't have to use "global" variables. Example is updated to utilize this methods.

I have also added simple php doc do functions and classes.

I won't probably use it but someone might find it useful. :)