eZPublish  3.8
eZURI Class Reference

Provides access to the HTTP uri. More...

Public Member Functions

attribute ($attr)
 
 attributes ()
 
base ($as_text=true)
 
 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

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

eZURI::dropBase ( )

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

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

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

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.

& eZURI::index ( )
Returns
the current index.

Referenced by attribute().

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

Referenced by eZURLTranslator\translate().

eZURI::isEmpty ( )
Returns
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.

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

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 eZURLOperator\modify(), and eZURLOperator\urlTransformation().

& 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: