I have a document that is able to use $this to access certain bits of info. Inside that document there is a function which cannot access $this (gives an error about not being inside an object).
Is there any way to allow it access to $this, so I can run the class's methods from within the function?
I have tried using globals but to no avail.