\o/
I read a summary thing that one of my lecturers wrote about my assessments in a CAD class at college. He had written "you're drawings have continued to improve". He also continually goes on about what he's going to learn us, telling us that we've already drew something so it'll be easy. Amongst other cringe inducing phrases. A fucking /lecturer/. (fail)
use MischiefCollective\ColorJizz\Formats\Hex; // im not sure why you'd ever want to do this echo Hex::fromString('CC0000')->toCIELab()->toHSV()->toRGB()->toHex()->toString(); // CC0000 // or.. use MischiefCollective\ColorJizz\Formats\CIELab; echo CIELab::create(53, 80, 69)->toHex()->toString(); // FE0000
class CMY { function toRGB() { return $this->toCMY()->toCMYK(); } } class RGB { function toCMYK() { return $this->toCMY()->toRGB(); } }
Hmm.
Slowly started moving it over to namespaced PHP5.3 with some unit tests and whatnot.
https://github.com/mikeemoo/ColorJizz-PHP
Still a long way to do, and a whole load of comments to add!
It's not very extendable the way it is, though. Thinking of restructuring it so it's got more of a plugin-style system going on.
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.