eZPublish  4.4
eZURI Class Reference

Provides access to the HTTP uri. More...

Public Member Functions

 attribute ($attr)
 
 attributes ()
 
 base ($as_text=true)
 
 convertFilterString ()
 
 dropBase ()
 
 element ($index=0, $relative=true)
 
 elements ($as_text=true)
 
 eZURI ($uri)
 
 hasAttribute ($attr)
 
 increase ($num=1)
 
 index ()
 
 isEmpty ()
 
 matchBase ($uri)
 
 originalURIString ($withLeadingSlash=false)
 
 setURIString ($uri, $fullInitialize=true)
 
 toBeginning ()
 
 toEnd ()
 
 uriString ($withLeadingSlash=false)
 
 userParameters ()
 

Static Public Member Functions

static codecURL ($url, $encode)
 
static decodeIRI ($str)
 
static decodeURL ($url)
 
static encodeIRI ($str)
 
static encodeURL ($url)
 
static instance ($uri=false)
 Returns a shared instance of the eZURI class IF $uri is false or the same as current request uri, if not then a new non shared instance is created. More...
 
static transformURI (&$href, $ignoreIndexDir=false, $serverURL= 'relative')
 

Public Attributes

 $Index
 The current index. More...
 
 $URI
 The original URI string. More...
 
 $URIArray
 The URI array. More...
 
 $UserArray
 User defined template variables. More...
 

Detailed Description

Provides access to the HTTP uri.

The URI can be accessed one element at a time with element() and elements() and can be iterated with increase() and the current index returned with index(). Moving the beginning and end is done with toBeginning() and toEnd(). The base can be retrieved with base() and the elements with elements().

This class also supports the attribute system.

Note
The index starts at 0

Member Function Documentation

eZURI::attribute (   $attr)
Returns
the value for attribute $attr or null if it does not exist.
eZURI::attributes ( )
Returns
the attributes for this object.

Referenced by hasAttribute().

eZURI::base (   $as_text = true)
Returns
the base string or the base elements as an array if $as_text is true.
See Also
elements

Referenced by attribute().

static eZURI::codecURL (   $url,
  $encode 
)
static

Parse URL and encode/decode its path string.

Referenced by decodeURL(), and encodeURL().

eZURI::convertFilterString ( )

Converts filter string to current locale. When an user types in browser url like: "/content/view/full/2/(namefilter)/a" 'a' letter should be urldecoded and converted from utf-8 to current locale.

Referenced by setURIString().

static eZURI::decodeIRI (   $str)
static

Decodes a path string which is in IRI format and returns the new path in the internal encoding.

More info on IRI here: http://www.w3.org/International/O-URL-and-ident.html

Referenced by codecURL(), and setURIString().

static eZURI::decodeURL (   $url)
static

Decodes URL which has path string is in IRI format and returns the new URL with path in the internal encoding.

eZURI::dropBase ( )

Removes all elements below the current index, recreates the URI string and sets index to 0.

Referenced by eZSiteAccess\match().

eZURI::element (   $index = 0,
  $relative = true 
)
Returns
the element at $index. If $relative is true the index is relative to the current index().

Referenced by eZModule\accessAllowed(), attribute(), eZSiteAccess\match(), and eZURLAliasML\urlTranslationEnabledByUri().

eZURI::elements (   $as_text = true)
Returns
all elements as a string, this is all elements after the current index. If $as_text is false the returned item is an array.

Referenced by attribute(), and eZSiteAccess\match().

static eZURI::encodeIRI (   $str)
static

Encodes path string in internal encoding to a new string which conforms to the IRI specification.

More info on IRI here: http://www.w3.org/International/O-URL-and-ident.html

Referenced by codecURL().

static eZURI::encodeURL (   $url)
static

Encodes path string of URL in internal encoding to a new string which conforms to the IRI specification.

Referenced by eZHTTPTool\redirect().

eZURI::eZURI (   $uri)

Initializes with the URI string $uri. The URI string is split on / into an array.

Referenced by instance().

eZURI::hasAttribute (   $attr)
Returns
true if the attribute $attr exist.
eZURI::increase (   $num = 1)

Moves the index 1 step up or $num if specified.

Referenced by eZSiteAccess\match().

eZURI::index ( )
Returns
the current index.

Referenced by attribute().

static eZURI::instance (   $uri = false)
static

Returns a shared instance of the eZURI class IF $uri is false or the same as current request uri, if not then a new non shared instance is created.

Parameters
$urifalse|string
Returns
eZURI
eZURI::isEmpty ( )
Returns
true if the URI is empty, ie it's equal to / or empty string.

Referenced by eZURLAliasML\urlTranslationEnabledByUri().

eZURI::matchBase (   $uri)

Tries to match the base of $uri against this base and returns the result. A match is made if all elements of this object match the base elements of the $uri object, this means that $uri's base may be longer than this base but not shorter.

Note
$uri must be a eZURI object
eZURI::originalURIString (   $withLeadingSlash = false)
Returns
the URI passed to the object with user parameters (if any).
Note
the URI will not include the leading / if $withLeadingSlash is true.

Referenced by attribute().

eZURI::setURIString (   $uri,
  $fullInitialize = true 
)

Sets the current URI string to $uri, the URI is then split into array elements and index reset to 1.

Referenced by eZURI(), and eZSiteAccess\match().

eZURI::toBeginning ( )

Moves the index to the beginning.

eZURI::toEnd ( )

Moves the index to the end.

static eZURI::transformURI ( $href,
  $ignoreIndexDir = false,
  $serverURL = 'relative' 
)
static
eZURI::uriString (   $withLeadingSlash = false)
Returns
the URI passed as to the object.
Note
the URI will not include the leading / if $withLeadingSlash is true.

Referenced by attribute().

eZURI::userParameters ( )

Member Data Documentation

eZURI::$Index

The current index.

Referenced by element(), and index().

eZURI::$URI

The original URI string.

Referenced by dropBase(), and uriString().

eZURI::$URIArray

The URI array.

eZURI::$UserArray

User defined template variables.

Referenced by userParameters().


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