ok, that's a bit odd but here's the situation:
I am working in an MVC context
I have a User class used as a library(User.php)
ANd then I have a controller class that handles input from the user(controller.php)
Here's how it goes:
- user registers
- registerhandler() is called in controller
- registerhandler() calls register() method in User class
- register() method creates a User instance with $this and returns a token and echoes a message linking to a verifyhandler() in controller class
- verifyhandler calls verify() method in User class
- verify() method uses $this to reference the User instance created by register()
- boom! $this is not pointing to the same object(created by register() method ) anymore!
I want to maintain that reference yet it seems to take on another value once it is passed to the controller. What can I do about it?