PluginManager
PluginManager

A class to load and manage plugins.

Functions
getConfig
function getConfig()

Gets configuration data for plugins from XML files.  Merges the installation wide and per-blog settings if applicable.

getPluginList
function getPluginList()

List all defined classes that are descended from Plugin.  This has the effect of getting a list of loaded plugins.

Returns

An array of class names.

pluginLoaded
function pluginLoaded(
$plugin_name
)

Determine if a specific plugin has been loaded.

Parameters
plugin_name

The name of the plugin class to check.

Returns

True if the plugin class is loaded, false otherwise.

getFileList
function getFileList()

List all the plugin files that get loaded.

Returns

An array of strings containing filenames.

loadPlugins
function loadPlugins()

Load all plugins.  In particular, include()s every file in the plugins directory then ends with a .php suffix in alphabetical order.  Plugins are found in the "plugins" directory under BLOG_ROOT or INSTALL_ROOT.  Plugins in BLOG_ROOT take precedence.  Subdirectories are not scanned.

testFile
function testFile(
$plug
)

Test if a particular plugin file exists.

Parameters
plug

The name of the plugin file.

Returns

True if the file exists in the userdata, LnBlog, or blog plugins directory, false otherwise.