eZPublish  3.9
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 ()
instance ($uri=false)
 isEmpty ()
 matchBase (&$uri)
originalURIString ($withLeadingSlash=false)
 setURIString ($uri, $fullInitialize=true)
 toBeginning ()
 toEnd ()
 transformURI (&$href, $ignoreIndexDir=false, $serverURL= 'relative')
uriString ($withLeadingSlash=false)
 userParameters ()

Public Attributes

 The current index. More...
 The original URI string. More...
 The URI array. More...
 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.

The index starts at 0

Member Function Documentation

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

Referenced by hasAttribute().

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

Referenced by attribute().

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().

eZURI::dropBase ( )

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

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

Referenced by attribute().

& eZURI::elements (   $as_text = true)
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().

eZURI::eZURI (   $uri)

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

Referenced by instance().

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

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

& eZURI::index ( )
the current index.

Referenced by attribute().

& eZURI::instance (   $uri = false)
the unique instance for the URI, if $uri is supplied it used as the global URI value.

Referenced by eZURLTranslator\translate().

eZURI::isEmpty ( )
true if the URI is empty, ie it's equal to / or empty string.
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.

$uri must be a ezuri object
& eZURI::originalURIString (   $withLeadingSlash = false)
the URI passed to the object with user parameters (if any).
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().

eZURI::toBeginning ( )

Moves the index to the beginning.

eZURI::toEnd ( )

Moves the index to the end.

eZURI::transformURI ( $href,
  $ignoreIndexDir = false,
  $serverURL = 'relative' 

Implementation of an 'ezurl' template operator. Makes valid ez publish urls to use in links.

Referenced by eZRSSExport\fetchRSS1_0(), eZRSSExport\fetchRSS2_0(), eZTemplatesStatisticsReporter\generateStatistics(), eZURLOperator\modify(), eZDebug\printReport(), and eZURLOperator\urlTransformation().

& eZURI::uriString (   $withLeadingSlash = false)
the URI passed as to the object.
the URI will not include the leading / if $withLeadingSlash is true.

Referenced by attribute().

eZURI::userParameters ( )

Member Data Documentation


The current index.

Referenced by element(), and index().


The original URI string.

Referenced by dropBase(), and uriString().


The URI array.


User defined template variables.

Referenced by userParameters().

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