I am building a web app for keywords research. Mainly what it does is it takes a keyword and it uses it to make curl requests and it parses numbers which then are stored in a mysql table. The curl request would be for example for retrieving yahoo number of results, number of diggs for that keyword, etc.
So I was thinking to code it in some way to use plugins (one for yahoo, other for digg, etc).
Is there any php framework that will help me in doing this?
Frameworks don’t handle things like that. You need to code it in plug-in way.
Following scenario will allow you to code in plug-in fashion:
Lets say we have directory called plugins in the root of the site and a table in the database called plugins with following structure (id, name, enabled, path)
Now you need to create an interface for your plug-ins. This way all plug-ins will have same basic structure.
Now you need to insert a record for the PluginExample in the database.
And lastly you need somekind of controller that loads all the enabled plugins from the database (get’s path) and the creates objects and executes them. Like so