BiggieStylin Evil Genius. Love it/Hate it.

30Nov/090

SiTech_Plugins

Well, I'm finally doing it. I'm rewriting my voodoo code that makes reloadable modules or plugins in PHP. I've always toyed with the idea of rewriting my original work for PHP_Modules and making it work with classes; now the time has come. I have started work with my SiTech library to make SiTech_Plugins. It will be the same concept of PHP_Modules, but not only will it work with functions, it will now work with classes. This is something that was never really possible before because when PHP_Modules was written, it was written for PHP 4.

I haven't gotten very far yet with code, but the theory of it is to create a base class with a __call() method. That's basically all the base class will consist of. When a plugin is loaded, the class read from the plugin file will be created to extend this base class. From there, all methods found within the class will be stored as lambda functions inside a special class variable. This then makes it easy to reload code, by recreating the lambda function when the code is reloaded. Therefore, the class itself never needs to be redefined, it just needs all the functions reloaded. So, in theory this is entirely possible with PHP 5 and the use of the magic __call() method for classes.

Some of you may wonder why I don't use runkit from PECL. While it would make things a ton easier, I wanted more of a code solution that might work for everyone without extra requirements. I might look into creating it to work both ways though. I can imagine runkit would be a lot cleaner method of doing such voodoo, but I'm also unsure if runkit will even compile with 5.3.  I'll have to do some research into that and find out for sure. Of course, there will be more to come as I make progress even if its good or bad progress.

20Dec/070

Just an update.

Hey all. I just thought I'd take a few minutes to write a post. I know, it's been a while again, but I've been pretty busy as of lately. I'm currently reading a new book, working on php-oop.net and working full time. This week I've also come down with a bad cold. Yesterday before getting off work I started to feel pretty crappy, so I went and layed down after work. Wound up falling asleep around 7 last night and didn't make it back out of bed until 8:30 this morning. So far it's just a head cold, but my whole body aches and I've got a slight fever. Nothing I can't deal with though.. start popping the cold pills and I'll be ok. Right now I just feel groggy because my whole head is clogged up.

On the programming side of things, I have been working on php-oop.net. Not much has been done recently, except I got my friend kuja to help me out with a new design. I don't have it active on the dev site yet, but I plan on doing so as soon as we iorn out a few things with the design. Just take note that the dev site might not always work as it's updated from SVN and could break. However, it's given me new motivation to actually want to work on the backend of the site now. Currently, there's only some basic user stuff implemented, which leaves a lot to be desired. At least it shows a base system that's somewhat functional. The SiTech backend that runs the site also needs work too, so I'm sort of maintaining both projects at once.

As far as progress with SimpleIRC, I haven't really touched it in a couple weeks. I've kept myself busy with other things. I really need to get back to SimpleIRC though as everyday miniE is showing more and more issues that I don't want to take the time to fix since I am writing a new bot. Things with my new server are going smoothly. I've since setup a lot of new stuff like SSL, virtual e-mail addresses, and a Call of Duty game server. I admit, I don't have a lot of time to play Call of Duty, but that's my own fault. It's at least nice to have a server up and running.

Well, that's all for now. I'll update later this week (or weekend) when I'm feeling better.