Difference between revisions of "API:EPrints"
Line 6: | Line 6: | ||
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | ||
==NAME== | ==NAME== | ||
− | + | EPrints - Institutional Repository software | |
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 80: | Line 80: | ||
<!-- Pod2Wiki=head_methods --> | <!-- Pod2Wiki=head_methods --> | ||
==METHODS== | ==METHODS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_version --> | ||
+ | ===version=== | ||
+ | |||
+ | $version = EPrints->VERSION() | ||
+ | Returns the version of EPrints in 'v' format (this is the UNIVERSAL method). | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_human_version --> | ||
+ | ===human_version=== | ||
+ | |||
+ | EPrints->human_version() | ||
+ | Returns the EPrints version in a human-readable form. | ||
+ | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> | ||
Line 94: | Line 120: | ||
When running under Mod_Perl this method is replaced. | When running under Mod_Perl this method is replaced. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_dump --> | ||
+ | ===dump=== | ||
+ | |||
+ | EPrints->dump( $VAR1 [, $VAR2 ... ] ) | ||
+ | Use {{API:PodLink|file=Data/Dumper|package_name=Data::Dumper|section=|text=Data::Dumper}} to dump the passed variables to STDERR. | ||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 118: | Line 157: | ||
===repository=== | ===repository=== | ||
− | $repo = $ep->repository( $repository_id, %options ); | + | $repo = $ep->repository( $repository_id, [%options] ); |
− | Return the | + | Return the [[API:EPrints/Repository|EPrints::Repository]] with the given ID, or undef. Options are... optional. |
Options noise=>1, etc. | Options noise=>1, etc. | ||
Line 134: | Line 173: | ||
$repo = $ep->current_repository(); | $repo = $ep->current_repository(); | ||
− | Returns the current repository. | + | Returns the current [[API:EPrints/Repository|EPrints::Repository]]. The current repository is determined by the apache request. |
Returns undef if there is no current repository active. | Returns undef if there is no current repository active. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
Line 171: | Line 197: | ||
<!-- Pod2Wiki=head_copyright --> | <!-- Pod2Wiki=head_copyright --> | ||
==COPYRIGHT== | ==COPYRIGHT== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
<span style='display:none'>User Comments</span> | <span style='display:none'>User Comments</span> |
Revision as of 10:46, 25 August 2011
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints - Institutional Repository software
SYNOPSIS
use EPrints qw(); # don't check current user (CLI only) use EPrints qw( no_check_user ); $eprints = EPrints->new; # CLI $repo = $eprints->repository( "demoprints" ); # CGI $repo = $eprints->current_repository; if( EPrints->VERSION() gt v3.2.0 ) { ... }
DESCRIPTION
Available Symbols
You can pass options to the EPrints package that effect the EPrints initialisation e.g.
use EPrints qw( no_check_user );
no_check_user
Do not check the current user/group is the same as the user/group in SystemSettings.
METHODS
version
$version = EPrints->VERSION()
Returns the version of EPrints in 'v' format (this is the UNIVERSAL method).
human_version
EPrints->human_version()
Returns the EPrints version in a human-readable form.
abort
EPrints->abort( $errmsg )
This subroutine is loaded before other modules so that it may be used to report errors when initialising modules.
When running under Mod_Perl this method is replaced.
dump
EPrints->dump( $VAR1 [, $VAR2 ... ] )
Use Data::Dumper to dump the passed variables to STDERR.
new
$ep = EPrints->new();
Construct a new EPrints system object.
repository
$repo = $ep->repository( $repository_id, [%options] );
Return the EPrints::Repository with the given ID, or undef. Options are... optional.
Options noise=>1, etc.
current_repository
$repo = $ep->current_repository();
Returns the current EPrints::Repository. The current repository is determined by the apache request.
Returns undef if there is no current repository active.
SEE ALSO
COPYRIGHT