Rounding numbers

From: Matt15 Jun 2012 11:23
To: Mikee 18 of 18

Your extensibility looks fine, I wouldn't bother trying to make a plug-in style system, it'll just turn into a hideous mess of over-complicated checks involving method_exists and depending on how you do it, file_exists too, all of which will only slow it down.

 

The only thing I might do is make the arguments to your class methods all objects so you can type hint them and thus enforce them to be something more robust than PHP's crappy loose typing.

 

If you want to make it really easy to extend, and as you're targeting PHP 5.3, (you'll know this already of course) just make sure you're using the 'static' keyword when calling static functions and not self so they too can be overloaded / inherited. Also put things into suitably small chunks in properly scoped methods and well, that's about it.

EDITED: 15 Jun 2012 11:23 by MATT