Difference between revisions of "API:EPrints/Plugin"

From EPrints Documentation
Jump to: navigation, search
(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. -...)
 
(Removing all content from page)
Line 1: Line 1:
<!-- 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.
 
-->{{Pod2Wiki}}{{API:Source|file=EPrints/Plugin.pm|package_name=EPrints::Plugin}}[[Category:API|Plugin]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::Plugin''' - Base class of all EPrints Plugins
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
This class provides the basic methods used by all EPrints Plugins.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_new -->==new==
 
 
  $plugin = EPrints::Plugin-&gt;new( %params );
 
 
Create a new instance of a plugin with the given parameters.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_local_uri -->==local_uri==
 
 
  $value = EPrints::Plugin-&gt;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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_global_uri -->==global_uri==
 
 
  $value = EPrints::Plugin-&gt;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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_id -->==get_id==
 
 
  $id = $plugin-&gt;get_id
 
 
Return the ID of this plugin.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_name -->==get_name==
 
 
  $name = $plugin-&gt;get_name
 
 
Return the ID of this plugin.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_type -->==get_type==
 
 
  $name = $plugin-&gt;get_type
 
 
Return the type of this plugin. eg. Export
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get_subtype -->==get_subtype==
 
 
  $name = $plugin-&gt;get_subtype
 
 
Return the sub-type of this plugin. eg. BibTex
 
 
This is the ID with the type stripped from the front.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_error_message -->==error_message==
 
 
  $msg = $plugin-&gt;error_message
 
 
Return the error message, if this plugin can't be used.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_broken -->==broken==
 
 
  $boolean = $plugin-&gt;broken
 
 
Return the value of a parameter in the current plugin.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_matches -->==matches==
 
 
  $name = $plugin-&gt;matches( $test, $param )
 
 
Return true if this plugin matches the test, false otherwise. If the test is not known then return false.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_param -->==param==
 
 
  $value = $plugin-&gt;param( $paramid )
 
 
Return the parameter with the given id. This uses the hard wired parameter unless an override has been configured for this archive.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_html_phrase_id -->==html_phrase_id==
 
 
  $phraseid = $plugin-&gt;html_phrase_id( $id )
 
 
Returns the fully-qualified phrase identifier for the $id phrase for this plugin.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_html_phrase -->==html_phrase==
 
 
  $xhtml = $plugin-&gt;html_phrase( $id, %bits )
 
 
Return the phrase belonging to this plugin, with the given id.
 
 
Returns a DOM tree.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_phrase -->==phrase==
 
 
  $utf8 = $plugin-&gt;phrase( $id, %bits )
 
 
Return the phrase belonging to this plugin, with the given id.
 
 
Returns a utf-8 encoded string.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_static_methods -->==Static Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_load -->===load===
 
 
  EPrints::Plugin::load() [static]
 
 
Load all system plugins
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_load_dir -->===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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_plugin_list -->===plugin_list===
 
 
  @plugin_ids  = EPrints::Plugin::plugin_list() [static]
 
 
Return either a list of all the ids of the system plugins.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_icon_url -->==icon_url==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Revision as of 15:41, 12 August 2009