ushahidi/SwiftRiver — pull request #233 by dkobia (2012-08-16 07:38:54+00:00)
Title: Plugin Install Scripts

* Allows plugins to include install scripts that are run when the plugin is activated see #222
* The plugin registers an installer callback
* Added a footer plugin hook

Example init.php:

class Webanalytics_Init {

public function __construct()
{
// Register an installer
Swiftriver_Plugins::register('webanalytics', array(new Webanalytics_Install(), 'db'));
}
}

Example Callback:

class Webanalytics_Install {

public function db()
{

}
}