Difference between revisions of "API:EPrints/URL"

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/URL.pm|package_name=EPrints::URL}}[[Category:API|URL]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::URL''' - URL utility methods
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
This module contains utility methods for generating and getting URLs, relative paths etc.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_synopsis -->=SYNOPSIS=
 
  use EPrints;
 
 
 
  my $base_url = $session-&gt;get_url-&gt;get(
 
    scheme =&gt; "auto",
 
    host =&gt; 1,
 
    path =&gt; "cgi",
 
    query =&gt; 0,
 
  );
 
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_methods -->=METHODS=
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_get -->==get==
 
 
  $url = $url-&gt;get( %opts [, $page ] )
 
 
Constructs a $url based on the current configuration and %opts. If $page is specified will return a URL to that page.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_scheme_auto -->==scheme_auto==
 
 
  scheme =&gt; "auto"
 
 
Link to same protocol as is active now (N/A to shell scripts).
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_scheme_http -->==scheme_http==
 
 
  scheme =&gt; "http"
 
 
Link to the non-secure location.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_scheme_https -->==scheme_https==
 
 
  scheme =&gt; "https"
 
 
Link to the secure location.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_host_1 -->==host_1==
 
 
  host =&gt; 1
 
 
Create an absolute link (including host and port).
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_path_auto -->==path_auto==
 
 
  path =&gt; "auto"
 
 
Use the current path (N/A to shell scripts).
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_path_static_path_cgi_path_images -->==path_static_path_cgi_path_images==
 
 
  path =&gt; "static", path =&gt; "cgi", path =&gt; "images"
 
 
Link to the root of the static, cgi and images respectively.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_query_1 -->==query_1==
 
 
  query =&gt; 1
 
 
Create a self-referential link (i.e. include all parameters in the query part).
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_new -->==new==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_to_string -->==to_string==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Revision as of 15:41, 12 August 2009