API:EPrints/URL

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::URL - URL utility methods

DESCRIPTION

This module contains utility methods for generating and getting URLs, relative paths etc.

SYNOPSIS

 use EPrints;
 
 my $base_url = $session->get_url->get(
   scheme => "auto",
   host => 1,
   path => "cgi",
   query => 0,
 );
 

METHODS

get

 $url = $url->get( %opts [, $page ] )

Constructs a $url based on the current configuration and %opts. If $page is specified will return a URL to that page.

scheme_auto

 scheme => "auto"

Link to same protocol as is active now (N/A to shell scripts).

scheme_http

 scheme => "http"

Link to the non-secure location.

scheme_https

 scheme => "https"

Link to the secure location.

host_1

 host => 1

Create an absolute link (including host and port).

path_auto

 path => "auto"

Use the current path (N/A to shell scripts).

path_static_path_cgi_path_images

 path => "static", path => "cgi", path => "images"

Link to the root of the static, cgi and images respectively.

query_1

 query => 1

Create a self-referential link (i.e. include all parameters in the query part).

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.

new

to_string