| [ Index ] |
PHP Cross Reference of MantisBT |
[Source view] [Print] [Project Stats]
Plugin API Handles the initialisation, management, and execution of plugins.
| Copyright: | Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org |
| Copyright: | Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net |
| File Size: | 920 lines (25 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| plugin_get_current() X-Ref |
| Get the currently executing plugin's basename. return: string Plugin basename, or null if no current plugin |
| plugin_push_current( $p_basename ) X-Ref |
| Add the current plugin to the stack param: string Plugin basename |
| plugin_pop_current() X-Ref |
| Remove the current plugin from the stack return: string Plugin basename, or null if no current plugin |
| plugin_page( $p_page, $p_redirect = false, $p_basename = null ) X-Ref |
| Get the URL to the plugin wrapper page. param: string Page name param: string Plugin basename (defaults to current plugin) |
| plugin_file_path( $p_filename, $p_basename ) X-Ref |
| Return a path to a plugin file. param: string File name param: string Plugin basename return: mixed File path or false if FNF |
| plugin_file( $p_file, $p_redirect = false, $p_basename = null ) X-Ref |
| Get the URL to the plugin wrapper page. param: string Page name param: string Plugin basename (defaults to current plugin) |
| plugin_file_include( $p_filename, $p_basename = null ) X-Ref |
| Include the contents of a file as output. param: string File name param: string Plugin basename |
| plugin_table( $p_name, $p_basename = null ) X-Ref |
| Given a base table name for a plugin, add appropriate prefix and suffix. Convenience for plugin schema definitions. param: string Table name param: string Plugin basename (defaults to current plugin) return: string Full table name |
| plugin_config_get( $p_option, $p_default = null, $p_global = false ) X-Ref |
| Get a plugin configuration option. param: string Configuration option name param: multi Default option value |
| plugin_config_set( $p_option, $p_value, $p_user = NO_USER, $p_project = ALL_PROJECTS, $p_access = DEFAULT_ACCESS_LEVEL ) X-Ref |
| Set a plugin configuration option in the database. param: string Configuration option name param: multi Option value param: int User ID param: int Project ID param: int Access threshold |
| plugin_config_delete( $p_option, $p_user = ALL_USERS, $p_project = ALL_PROJECTS ) X-Ref |
| Delete a plugin configuration option from the database. param: string Configuration option name param: int User ID param: int Project ID |
| plugin_config_defaults( $p_options ) X-Ref |
| Set plugin default values to global values without overriding anything. param: array Array of configuration option name/value pairs. |
| plugin_lang_get( $p_name, $p_basename = null ) X-Ref |
| Get a language string for the plugin. Automatically prepends plugin_<basename> to the string requested. param: string Language string name param: string Plugin basename return: string Language string |
| plugin_history_log( $p_bug_id, $p_field_name, $p_old_value, $p_new_value = '', $p_user_id = null, $p_basename = null ) X-Ref |
| No description |
| plugin_error( $p_error_name, $p_error_type = ERROR, $p_basename = null ) X-Ref |
| Trigger a plugin-specific error with the given name and type. param: string Error name param: int Error type param: string Plugin basename |
| plugin_event_hook( $p_name, $p_callback ) X-Ref |
| Hook a plugin's callback function to an event. param: string Event name param: string Callback function |
| plugin_event_hook_many( $p_hooks ) X-Ref |
| Hook multiple plugin callbacks at once. param: array Array of event name/callback key/value pairs |
| plugin_child( $p_child ) X-Ref |
| Allows a plugin to declare a 'child plugin' that can be loaded from the same parent directory. param: string Child plugin basename. |
| plugin_is_loaded( $p_basename ) X-Ref |
| Checks if a given plugin has been registered and initialized, and returns a boolean value representing the "loaded" state. param: string Plugin basename return: boolean Plugin loaded |
| plugin_version_array( $p_version ) X-Ref |
| Converts a version string to an array, using some punctuation and number/lettor boundaries as splitting points. param: string Version string return: array Version array |
| plugin_version_check( $p_version1, $p_version2, $p_maximum = false ) X-Ref |
| Checks two version arrays sequentially for minimum or maximum version dependencies. param: array Version array to check param: array Version array required param: boolean Minimum (false) or maximum (true) version check return: int 1 if the version dependency succeeds, -1 if it fails |
| plugin_dependency( $p_basename, $p_required, $p_initialized = false ) X-Ref |
| Check a plugin dependency given a basename and required version. Versions are checked using PHP's library version_compare routine and allows both minimum and maximum version requirements. Returns 1 if plugin dependency is met, 0 if dependency not met, or -1 if dependency is the wrong version. param: string Plugin basename param: string Required version return: integer Plugin dependency status |
| plugin_protected( $p_basename ) X-Ref |
| Checks to see if a plugin is 'protected' from uninstall. param: string Plugin basename return: boolean True if plugin is protected |
| plugin_priority( $p_basename ) X-Ref |
| Gets a plugin's priority. param: string Plugin basename return: int Plugin priority |
| plugin_is_installed( $p_basename ) X-Ref |
| Determine if a given plugin is installed. param: string Plugin basename return: boolean True if plugin is installed |
| plugin_install( $p_plugin ) X-Ref |
| Install a plugin to the database. param: string Plugin basename |
| plugin_needs_upgrade( $p_plugin ) X-Ref |
| Determine if an installed plugin needs to upgrade its schema. param: string Plugin basename return: boolean True if plugin needs schema ugrades. |
| plugin_upgrade( $p_plugin ) X-Ref |
| Upgrade an installed plugin's schema. param: string Plugin basename return: multi True if upgrade completed, null if problem |
| plugin_uninstall( $p_plugin ) X-Ref |
| Uninstall a plugin from the database. param: string Plugin basename |
| plugin_find_all() X-Ref |
| Search the plugins directory for plugins. return: array Plugin basename/info key/value pairs. |
| plugin_include( $p_basename, $p_child = null ) X-Ref |
| Load a plugin's core class file. param: string Plugin basename |
| plugin_register( $p_basename, $p_return = false, $p_child = null ) X-Ref |
| Register a plugin with MantisBT. The plugin class must already be loaded before calling. param: string Plugin classname without 'Plugin' postfix |
| plugin_register_installed() X-Ref |
| Find and register all installed plugins. |
| plugin_init_installed() X-Ref |
| Initialize all installed plugins. Post-signals EVENT_PLUGIN_INIT. |
| plugin_init( $p_basename ) X-Ref |
| Initialize a single plugin. param: string Plugin basename return: boolean True if plugin initialized, false otherwise. |
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |