$world->requireplugin
$world->requireplugin function: REQUIREs a PLUGIN to be loaded
$success = $world->requireplugin( |
name
) ; |
This function is similar to
$world->loadplugin
, but first checks if the plugin is
already loaded. If it is, it returns successfully. If not, it tries
loading the plugin (silently). If this succeeds, the function returns
successfully, if not, it die
()'s. This function
is useful in plugins that require other plugins, and is meant to be
called in a BEGIN
block of a plugin that requires
another.
The argument passed must be the name of the plugin (a path to
the file is not allowed, unlike with
$world->loadplugin
. See
$world->loadplugin
for
information on how plugins are found.