Static method for checking if a user is online |
[eluser]Patrick Reck[/eluser]
I'm currently developing a dating portal using CodeIgniter and HMVC patterns. However, I've now come to a problem I can't seem to find a solution for. I need to check wether a user is online or not in pretty much all of my modules. However, I would prefer not having to have my checkUserOnline() method in every modules model. How can I make a static method which I can access from all of my controllers across modules?
[eluser]Otemu[/eluser]
Hi, Setting up a base controller will solve all your problems, just have hmvc modules extending a base controller. The excellent Phil Sturgeon talks about it here http://philsturgeon.co.uk/blog/2010/02/C...ing-it-DRY |
Welcome Guest, Not a member yet? Register Sign In |