You are here: Plugin systems « PHP « IT news, forums, messages
Plugin systems

Posted by Marcus Bointon on 10/21/83 11:17

I'm looking to build a plugin system for my web application. I'm
going to need to handle multiple types of plugin. I know that many of
them exist already, but I'm wanting something that's very object-
clean and PHP5-aware. I was thinking about using multiple interface
implementations, so that I could have a plugin that provides a
particular kind of database access, provides a user interface for
admin purposes, and a simple display unit perhaps for connection
status. In this case I'd define a class like:

class mynewplugin extends pluginbase implements database, admin,
display {
//...
}

I would then be able to introspect (using class_implements etc) to
find, for example, all plugins that implement database access. I
could easily add more plugin types by adding more interface types.
The overall benefit being that all kind of plugin are handled through
a single mechanism.

Does this sound like a solid structure and mechanism?

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация