📚 Looking for current Exponential documentation? This site contains legacy SDK & API reference docs (eZ Publish era). For up-to-date 2026 product documentation, visit doc.exponential.earth.

  class / eZURI  

eZURI Class Reference
[HTTP utilities]

Provides access to the HTTP uri. More...

List of all members.


Public Methods

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

Public Attributes

 URI
 The original URI string.

 URIArray
 The URI array.

 Index
 The current index.


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

Definition at line ezuri.php.


Constructor & Destructor Documentation

eZURI::eZURI (  $    uri ) 
 

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

Definition at line ezuri.php.

References setURIString().

Referenced by instance().


Member Function Documentation

& eZURI::attribute (  $    attr ) 
 

Returns:
the value for attribute $attr or null if it does not exist.

Definition at line ezuri.php.

References uriString().

eZURI::attributes (    ) 
 

Returns:
the attributes for this object.

Definition at line ezuri.php.

References index().

eZURI::base (  $    as_text = true ) 
 

Returns:
the base string or the base elements as an array if $as_text is true.
See also:
elements

Definition at line ezuri.php.

References elements().

Referenced by hasAttribute().

eZURI::dropBase (    ) 
 

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

Definition at line ezuri.php.

References URIArray.

eZURI::element (  $    index = 0,
$    relative = true
) 
 

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

Definition at line ezuri.php.

References URIArray.

Referenced by hasAttribute().

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.

Definition at line ezuri.php.

References elements().

Referenced by elements().

eZURI::hasAttribute (  $    attr ) 
 

Returns:
true if the attribute $attr exist.

Definition at line ezuri.php.

References index().

eZURI::increase (  $    num = 1 ) 
 

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

Definition at line ezuri.php.

References Index.

eZURI::index (    ) 
 

Returns:
the current index.

Definition at line ezuri.php.

References Index.

Referenced by hasAttribute().

& eZURI::instance (  $    uri = false ) 
 

Returns:
the unique instance for the URI, if $uri is supplied it used as the global URI value.

Definition at line ezuri.php.

References eZURI().

Referenced by eZURLTranslator::translate().

eZURI::isEmpty (    ) 
 

Returns:
true if the URI is empty, ie it's equal to / or empty string.

Definition at line ezuri.php.

References URI.

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

Definition at line ezuri.php.

References URIArray.

eZURI::setURIString (  $    uri ) 
 

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

Definition at line ezuri.php.

References URIArray.

Referenced by eZURI().

eZURI::toBeginning (    ) 
 

Moves the index to the beginning.

Definition at line ezuri.php.

References Index.

eZURI::toEnd (    ) 
 

Moves the index to the end.

Definition at line ezuri.php.

References Index.

eZURI::uriString (  $    withLeadingSlash = false ) 
 

Returns:
the URI passed as to the object.
Note:
the URI will not include the leading / if $withLeadingSlash is true.

Definition at line ezuri.php.

References URI.

Referenced by attribute().


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

Exponential Copyright © 1998 - 2026 7x