![]() |
XBL Gamercard Fetching Class
Found this at simes.org. It's a class for fetching Xbox Live Gamertags. Pretty neat. I haven't looked through the entire code yet to see if there's stuff that needs to be fixed, etc. I'm new to OOP in PHP5, but this looks like it was written for PHP4. Someone correct me if I'm wrong. Enjoy.
PHP Code:
|
From a quick glance, yes it's almost certainly 'old' PHP4 code. It could do with being updated for PHP5. :)
|
Hmm!
If I find time this week, I'll give rewriting it for php5 a whirl. |
Sadly, it looks like PHP4 to me as well.
|
Thats probably the most useless implementation of a class i have ever seen.
A whole class for just defining variables? Has no one heard of define()? |
It's the object oriented approach, bluesaga. You don't have to like it, but having a wrapper for the Card details is a good thing in my eyes. Why the functions aren't methods of the class I've no idea though.
|
I just feel having a whole class for 7 variables is a bit weird when you don't wrap the functions within the class aswell, its like forcing half a script to use a class and the other half to not worry. Its just weird and bad coding practice to do so.
|
| All times are GMT. The time now is 04:16 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0