Right, I am just about to check in some new code that makes will make it very easy to import/prepare Creole for the ZenMagick loader architecture. The new (mostly unused) class ZMPhpCompressor also allows to squezze a full Creole release (everything under classes) into a single 188kb file.
I am actually not sure if I should include that already with the next release, as right now there are probably about 3 or four queries per request done by the new API and I might as well stick with the existing code a bit longer – we’ll see.
The code depends on two other ZenMagick classes, so it’s not very portable (if anyone is interested), but apart from that it works fine
The actual code to do the magic looks like this on my XP box:
$creole = 'creole-1.1.0';
$comp = new ZMPhpCompressor();
$comp->setRoot(‘C:\Program Files\Apache Group\Apache2\htdocs\zen-cart\zenmagick\core\ext/’.$creole);
$comp->setOut(‘C:\Program Files\Apache Group\Apache2\htdocs\zen-cart\zenmagick\core\ext/’.$creole.’.php’);
$comp->setTemp(‘C:\Program Files\Apache Group\Apache2\htdocs\zen-cart\tmp’);
Not sure how often I’ll be using this, but it’s nice not having to try to remember these things once they are needed again!
The only caveeat is that compressing into a single file breaks the Creole ‘dot-path notation’, so in order to use the MySQL driver you’ll need to do something like:
to avoid errors about missing drivers. Since all database access in ZenMagick is handled by a single database provider class that’s not really an issue, though.
That means the last open issue is to write some proper release notes – oh, well, babysteps