views:

70

answers:

3
+1  Q: 

PHP Plugins System

Possible Duplicate:
Best way to allow plugins for a PHP application

Hello all..

I'd like to learn how does the php plugins system works.. So can anyone explain the idea of it for me in detail, I saw many posts and explanations but I didn't learn and understand any of it.

Edited: Sorry.. I meant if I want to make a plugins system for my php script, how ??

That's all and thanks advance.

A: 

PHPplexus to the rescue.

http://code.google.com/p/phpplexus/

Otar
Thanks, I need more resources..
phplover
Also take a look at PHP observer pattern, very handful.Oh and look inside CodeInigetr's Hooks too.
Otar
thanks very much
phplover
A: 

A simple solution would be PHPHooks, which works in a similar way to WordPress' use of hooks:

http://code.google.com/p/phphooks/

Keyvan
A: 

You could use the Event Dispatcher library to fire events at the "hook points" of your code. Modules could then register as observers for the events.

If you want to have a look at plugin systems in real-world applications, I would suggest having a look at Dokuwiki which has a nice event system. Also have a look at Drupal which has a module/plugin system that's based on naming conventions.

chiborg