API:EPrints/Plugin

From EPrints Documentation
Revision as of 18:29, 11 August 2009 by Tdb01r (talk | contribs) (New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki

NAME

EPrints::Plugin - Base class of all EPrints Plugins

DESCRIPTION

This class provides the basic methods used by all EPrints Plugins.

new

 $plugin = EPrints::Plugin->new( %params );

Create a new instance of a plugin with the given parameters.

local_uri

 $value = EPrints::Plugin->local_uri

Return a unique ID for this plugin as it relates to the current repository. This can be used to distinguish that XML import for different repositories may have minor differences.

This URL will not resolve to anything useful.

global_uri

 $value = EPrints::Plugin->global_uri

Return a unique ID for this plugin, but not just in this repository but for any repository. This can be used for fuzzier tools which do not care about the minor differences between EPrints repositories.

This URL will not resolve to anything useful.

get_id

 $id = $plugin->get_id

Return the ID of this plugin.

get_name

 $name = $plugin->get_name

Return the ID of this plugin.

get_type

 $name = $plugin->get_type

Return the type of this plugin. eg. Export

get_subtype

 $name = $plugin->get_subtype

Return the sub-type of this plugin. eg. BibTex

This is the ID with the type stripped from the front.

error_message

 $msg = $plugin->error_message

Return the error message, if this plugin can't be used.

broken

 $boolean = $plugin->broken

Return the value of a parameter in the current plugin.

matches

 $name = $plugin->matches( $test, $param )

Return true if this plugin matches the test, false otherwise. If the test is not known then return false.

param

 $value = $plugin->param( $paramid )

Return the parameter with the given id. This uses the hard wired parameter unless an override has been configured for this archive.

html_phrase_id

 $phraseid = $plugin->html_phrase_id( $id )

Returns the fully-qualified phrase identifier for the $id phrase for this plugin.

html_phrase

 $xhtml = $plugin->html_phrase( $id, %bits )

Return the phrase belonging to this plugin, with the given id.

Returns a DOM tree.

phrase

 $utf8 = $plugin->phrase( $id, %bits )

Return the phrase belonging to this plugin, with the given id.

Returns a utf-8 encoded string.

Static Methods

load

 EPrints::Plugin::load() [static]

Load all system plugins

load_dir

 EPrints::Plugin::load_dir( $reg, $path, $baseclass, $prefix ) [static]

Load plugins in this directory and recurse through subdirectories.

$reg is a pointer to a hash to store the lost of found plugins in.

plugin_list

 @plugin_ids  = EPrints::Plugin::plugin_list() [static]

Return either a list of all the ids of the system plugins.

UNDOCUMENTED METHODS

Warning These methods were found in the source code but didn't have any POD associated with them. This may be because we haven't got around to documenting them yet or it could be because they are internal to the API and not intended for use by other parts of EPrints.

icon_url