PluginManager

A class to load and manage plugins.

Summary
A class to load and manage plugins.
Gets configuration data for plugins from INI files.
List all defined classes that are descended from Plugin.
List all the plugin files that get loaded.
Load all plugins.
Test if a particular plugin file exists.

Functions

getConfig

function getConfig()

Gets configuration data for plugins from INI 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.

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

plugThe name of the plugin file.

Returns

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

function getConfig()
Gets configuration data for plugins from INI files.
function getPluginList()
List all defined classes that are descended from Plugin.
function getFileList()
List all the plugin files that get loaded.
function loadPlugins()
Load all plugins.
function testFile($plug)
Test if a particular plugin file exists.