FreenetIS
 All Classes Namespaces Functions Variables Pages
Static Public Member Functions | List of all members
url Class Reference

Static Public Member Functions

static base ($index=FALSE, $protocol=FALSE)
 Returns base url.
static domain ()
static suffix ()
static protocol ()
 Returns protocol.
static site ($uri= '', $protocol=FALSE)
 Fetches a site URL based on a URI segment.
static current ($qs=FALSE)
 Fetches the current URI.
static previous ()
static uri ($url)
static title ($title, $separator= '-')
 Convert a phrase to a URL-safe title.
static redirect ($uri= '', $method= '302')
 Sends a page redirect header.
static create ($uri)
 Creates URL from URI.
static slice ($url, $offset=0, $length=NULL)
 Returns slice from url.
static query_string ($url, $format= 'string')
 Returns query string from url in given format.
static build_query ($array=array())
 Builds query string from array.

Member Function Documentation

static url::base (   $index = FALSE,
  $protocol = FALSE 
)
static

Returns base url.

Parameters
<type>$index
<type>$protocol
Returns
<type>
static url::build_query (   $array = array())
static

Builds query string from array.

Author
Michal Kliment
Parameters
type$array
Returns
string
static url::create (   $uri)
static

Creates URL from URI.

Author
Michal Kliment
Parameters
string$uri
Returns
string
static url::current (   $qs = FALSE)
static

Fetches the current URI.

Parameters
booleaninclude the query string
Returns
string
static url::domain ( )
static
Author
Michal Kliment Returns domain
Returns
string
static url::previous ( )
static
Author
Michal Kliment Returns previuos URI
Returns
string
static url::protocol ( )
static

Returns protocol.

Author
Michal Kliment, Ondřej Fibich
Returns
string
static url::query_string (   $url,
  $format = 'string' 
)
static

Returns query string from url in given format.

Author
Michal Kliment
Parameters
string$url
string$format
Returns
mixed
static url::redirect (   $uri = '',
  $method = '302' 
)
static

Sends a page redirect header.

Parameters
stringsite URI or URL to redirect to
stringHTTP method of redirect
Returns
A HTML anchor, but sends HTTP headers. The anchor should never be seen by the user, unless their browser does not understand the headers sent.
static url::site (   $uri = '',
  $protocol = FALSE 
)
static

Fetches a site URL based on a URI segment.

Parameters
stringsite URI to convert
stringnon-default protocol
Returns
string
static url::slice (   $url,
  $offset = 0,
  $length = NULL 
)
static

Returns slice from url.

Author
Michal Kliment
Parameters
string$url
integer$offset
integer$length
Returns
string
static url::suffix ( )
static
Author
Michal Kliment Returns url suffix
Returns
string
static url::title (   $title,
  $separator = '-' 
)
static

Convert a phrase to a URL-safe title.

Parameters
stringphrase to convert
stringword separator (- or _)
Returns
string
static url::uri (   $url)
static
Author
Michal Kliment Returns URI
Returns
string

The documentation for this class was generated from the following file: