PHP Classes
Icontem

Class: phpPlugin


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of David Bittencourt  >  phpPlugin  >  Download  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: phpPlugin Support forum
Base name: phpplugin
Description: Dynamically extend a PHP class using plug-ins
Related top rated classes:
Version: -
Required PHP version: -
License: Freely Distributable
All time users: 2491 users
All time rank: 991
Week users: 2 users
Week rank: 2817
 
  Author   Group folder image Groups   Detailed description  
  Rate classes User ratings   Applications   Files Files  

Author

Picture of David Bittencourt
Name: David Bittencourt <e-mail contact>
Published packages: 1 Browse this author's classes Browse this author's classes
Country: Brazil Brazil - PHP jobs in Brazil
Home page: ???
Age: 28
All time rank: 816
Week rank: 1621

Innovation Award

PHP Programming Innovation award nominee
June 2004
Number 2
The usual method for extending a class to add new functionality without having to change the class code is to create a subclass with new functions and variables that implement the new functionality.

However, if several people extend the same class with their own subclasses, it is difficult benefit from extensions developed by different people because their subclasses are separated.

This class implements a very innovative solution for extending a class using independent plug-in functions. It works by generating a new subclass that combines multiple functions that are defined in separate script files.

This way any developer may create a new class extension combining the functions defined by the plug-ins that they are interested, providing a more flexible and thus more powerful means of code reuse.

Manuel Lemos

Groups

Group folder image Language Constructs to assist in the language control View top rated classes
Group folder image Code Generation Compilers and tools that generate code automatically View top rated classes

Detailed description

This class is meant to dynamically extend any object of a class with new plug-in functions or collections of functions that are defined in separate files or from variables.

It works by dynamically creating a new sub-class of the class of given object adding the plug-in functions that are specified at runtime.

The name of the loaded plugin functions are stored in the object to prevent loading the same plugin more than once, but you still can force a reload so a new plugin can replace an old one.

User ratings

Ratings
Utility
Consistency
Documentation
Examples
Tests
Videos
Overall
Rank
All time:
Sufficient (73.2%)
Sufficient (75.0%)
-
Good (80.4%)
-
-
Not sure (52.1%)
1185
Month:
Not yet rated by the users

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Files

File Role Description
Plain text file example.php Example Example script
Plain text file plugin.class.php Class Main class
Files folder image plugins
  Plain text file bar.func.php Aux. Plugin bar() for test.php and example.php
  Plain text file bar.php Aux. Different bar() plugin for test.php and example.php
Plain text file test.php Example test.php
Download all files: phpplugin.tar.gz phpplugin.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products