[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/plugin/ -> pluginmanager.class.php (sommaire)

other various constants

Poids: 410 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 14 fois
Nécessite: 0 fichiers

Définit 1 class

PluginManager:: (20 méthodes):
  PluginManager()
  getPluginList()
  setBlogInfo()
  setUserInfo()
  getPluginManager()
  isEnabled()
  pluginIsRegistered()
  _pluginCanRun()
  loadPlugins()
  getPluginListFromFolder()
  savePluginList()
  _createPluginInstance()
  refreshPluginList()
  _loadPluginLocale()
  getPluginDir()
  getPlugins()
  notifyEvent()
  registerNotification()
  getDefinedEvents()
  pluginHasLocale()


Classe: PluginManager  - X-Ref

\ingroup Plugin

Implements a 'plugin manager' a class that takes care of loading plugins, initializing
them, allowing plugins to register for certain events, etc.

This class will rarely be called by user classes, since all the plugin initialization and
delivery of messages is handled by the core classes.

You should not create objects of this class. In case you need a handle to the global
PluginManager, please use the singlethod getPluginManager as follows:

<pre>
$pm =& PluginManager::getPluginManager();
$pm->notifyEvent( ... );
</pre>
PluginManager( $pluginDir = PLUGIN_MANAGER_DEFAULT_PLUGIN_FOLDER, $filePattern = PLUGIN_MANAGER_DEFAULT_PLUGIN_FILE_PATTERN )   X-Ref
Constructor.

param: pluginDir Specifies from which folders templates should
param: filePattern

getPluginList()   X-Ref
Pas de description

setBlogInfo( &$blogInfo )   X-Ref
Sets the blog info

param: blogInfo

setUserInfo( &$userInfo )   X-Ref
Sets the user info

param: userInfo

getPluginManager( $pluginDir = PLUGIN_MANAGER_DEFAULT_PLUGIN_FOLDER, $filePattern = PLUGIN_MANAGER_DEFAULT_PLUGIN_FILE_PATTERN )   X-Ref
Returns the current instance of the plugin manager.

param: pluginDir
param: filePattern
return: Returns an instance of the PluginManager, so that there is only one plugin

isEnabled()   X-Ref
Returns wether the plugin manager is enabled or not.

return: A boolean value telling wether the plugin manager is enabled or not.

pluginIsRegistered( $pluginId )   X-Ref
returns true if the given plugin has been registered as a such

param: pluginId the identifier of the plugin
return: Returns true if the plugin is registered or false otherwise

_pluginCanRun( $version )   X-Ref
Checks whether the version reported by the plugin is compatible with the current version of LT

return: True if compatible or false otherwise.

loadPlugins( $source = "" )   X-Ref
Loads all the plugins from disk

param: source

getPluginListFromFolder()   X-Ref
refreshes the list of folders from disk


savePluginList( $list )   X-Ref
saves the list of plugins to the config backend


_createPluginInstance( $plugin )   X-Ref

return: Returns a reference to a plugin class extending PluginBase or null if there was an error

refreshPluginList()   X-Ref


_loadPluginLocale( $pluginId, $locale )   X-Ref


getPluginDir()   X-Ref
Returns the folder used to store the plugins.

return: The folder used to store the plugins.

getPlugins()   X-Ref
Returns the array of plugins.

return: An array of PluginBase objects.

notifyEvent( $eventType, $params = Array()   X-Ref
notifies all the event plugins about an event

param: eventType
param: params
return:

registerNotification( $eventType, &$pluginClass )   X-Ref
tells the plugin manager that a certain event plugin class wants to be notified about
a certain event.

param: eventType
param: pluginClass
return: Always true

getDefinedEvents()   X-Ref
returns the events that have been defined

return: An array with the names of the events that have been defined so far

pluginHasLocale( $pluginId, $localeCode )   X-Ref
returns true if the plugin provides the requested locale

param: pluginId The plugin identifier that we're like to check
param: localeCode the locale code
return: True if the plugin has this locale or false otherwise



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics