eZ Publish  [4.2]
eZURLAliasML Class Reference

Handles URL aliases in eZ Publish. More...

+ Inheritance diagram for eZURLAliasML:
+ Collaboration diagram for eZURLAliasML:

List of all members.

Public Member Functions

 actionURL ()
 eZURLAliasML ($row)
 getChildren ()
 getPath ($locale=null, $incomingLanguageList=null)
 setAttribute ($name, $value)
 store ($fieldFilters=null)

Static Public Member Functions

static actionToUrl ($action)
static choosePrioritizedRow ($rows)
 Chooses the most prioritized row (based on language) of $rows and returns it.
static cleanURL ($url)
static convertPathToAlias ($pathURL)
static convertToAlias ($urlElement, $defaultValue=false)
static convertToAliasCompat ($urlElement, $defaultValue=false)
static create ($element, $action, $parentID, $language)
static definition ()
static fetchByAction ($actionName, $actionValue, $maskLanguages=false, $onlyPrioritized=false, $includeRedirections=false)
static fetchByParentID ($id, $maskLanguages=false, $onlyPrioritized=false, $includeRedirections=true)
static fetchByPath ($uriString, $glob=false)
static fetchNodeIDByPath ($uriString, $glob=false)
static fetchPathByActionList ($actionName, $actionValues, $locale=null)
static findUniqueText ($parentElementID, $text, $action, $linkCheck=false, $languageID=false)
static getNewID ()
static nodeIDFromAction ($action)
static removeByAction ($actionName, $actionValue)
static removeSingleEntry ($parentID, $textMD5, $language)
static reverseTranslate (&$uri, $uriString, $internalURIString)
static sanitizeURL ($url)
static setLangMaskAlwaysAvailable ($langID, $actionName, $actionValue)
static storePath ($path, $action, $languageName=false, $linkID=false, $alwaysAvailable=false, $rootID=false, $cleanupElements=true, $autoAdjustName=false, $reportErrors=true, $aliasRedirects=true)
static strtolower ($text)
static translate (&$uri, $reverse=false)
static urlToAction ($url)
static urlTranslationEnabledByUri (eZURI $uri)

Public Attributes

 $Path
const ACTION_INVALID = 51
const DB_ERROR = 101
const LINK_ALREADY_TAKEN = 3
const LINK_ID_NOT_FOUND = 1
const LINK_ID_WRONG_ACTION = 2

Static Private Member Functions

static dbError ($db)
static filterRows ($rows, $onlyPrioritized)
static generateCond ($table, $prevTable, $i, $langMask, $element)
static generateFullSelect ($table)
static generateGlobCond ($table, $prevTable, $i, $langMask, $glob)
static generateSelect ($table, $i, $len)
static languageScore ($mask)
static md5 ($db, $text, $escape=true)

Static Private Attributes

static $charset = null

Detailed Description

Handles URL aliases in eZ Publish.

URL aliases are different names for existing URLs in eZ Publish. Using URL aliases allows for having better looking urls on the webpage as well as having fixed URLs pointing to various locations.

This class handles storing, fetching, moving and subtree updates on eZ Publish URL aliases, this performed using methods from eZPersistentObject.

The table used to store path information is designed to keep each element in the path (separated by /) in one row, ie. not the entire path. Each row uses the *parent* field to say which element is the parent of the current one, a value of 0 means a top-level path element. The system also supports path elemens in multiple languages, each language is stored in separate rows but with the same path element ID, the exception is when the text of multiple languages are the same then they will simply share the same row.

Instead of manipulating path elements directly it is recommended to use one the higher level methods for fetching or storing a path.

For objects the methods getChildren() and getPath() can be used to fetch the child elements and path string.

Typically you will not have a path element object and should use on of these static functions:

  • storePath() - Stores a given path with specified action, all parent are created if they don't exist.
  • fetchByPath() - Fetch path elements by path string, some wildcard support is also available.
  • translate() - Translate requested path string into the internal path.

For more detailed path element handling these static methods are available:

Most of these methods have some common arguments, they can be:

  • $maskLanguages - If true then only elements which matches the currently prioritized languaes is processed.
  • $onlyPrioritized - If true then only the top prioritized language of the elements is considered. Requires $maskLanguages to be set to true.
  • $includeRedirections - If true then elements which redirects to this is also processed.

Definition at line 80 of file ezurlaliasml.php.


Member Function Documentation

static eZURLAliasML::actionToUrl ( action) [static]

Decodes the action string $action into an internal path string and returns it.

The following actions are supported:

  • eznode - argument is node ID, path is 'content/view/full/<nodeID>'
  • module - argument is module/view/args, path is the arguments
  • nop - a no-op, path is '/'

Definition at line 1996 of file ezurlaliasml.php.

Referenced by eZPathElement\actionURL(), actionURL(), and translate().

eZURLAliasML::actionURL ( )

Converts the action property into a real url which responds to the module/view on the site.

Definition at line 191 of file ezurlaliasml.php.

static eZURLAliasML::choosePrioritizedRow ( rows) [static]

Chooses the most prioritized row (based on language) of $rows and returns it.

Parameters:
array$rows
Returns:
array|false The most prioritized row, or false if no match was found

Definition at line 1888 of file ezurlaliasml.php.

Referenced by fetchByPath(), filterRows(), eZPathElement\getPath(), getPath(), eZPathElement\getPathArray(), reverseTranslate(), and translate().

static eZURLAliasML::cleanURL ( url) [static]

Makes sure the URL $url does not contain leading and trailing slashes (/).

Returns:
the clean URL

Definition at line 2066 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\checkPath(), fetchByPath(), eZWebDAVContentBackend\getVirtualFolderCollection(), eZHTTPHeader\headerOverrideArray(), storePath(), eZURLWildcard\translate(), translate(), and eZContentObjectTreeNode\urlAlias().

static eZURLAliasML::convertPathToAlias ( pathURL) [static]

Converts the path $pathURL into a new alias path with limited characters. For more information on the conversion see convertToAlias().

Note:
each element in the path (separated by / (slash) ) is converted separately.
Returns:
the converted path

Definition at line 2241 of file ezurlaliasml.php.

Referenced by eZWebDAVContentServer\fetchNodeByTranslation(), eZWebDAVContentBackend\fetchNodeByTranslation(), eZWebDAVContentServer\fetchParentNodeByTranslation(), and eZWebDAVContentBackend\fetchParentNodeByTranslation().

static eZURLAliasML::convertToAlias ( urlElement,
defaultValue = false 
) [static]
static eZURLAliasML::convertToAliasCompat ( urlElement,
defaultValue = false 
) [static]

Definition at line 2216 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\updateSubTreePath().

static eZURLAliasML::create ( element,
action,
parentID,
language 
) [static]

Creates a new path element with given arguments, MD5 sum is automatically created.

Parameters:
$elementThe text string for the path element.
$actionAction string.
$parentIDID of parent path element.
$languageID or mask of languages
$languageNameName of language(s), comma separated

Definition at line 205 of file ezurlaliasml.php.

Referenced by storePath().

static eZURLAliasML::dbError ( db) [static, private]

Returns a structure with the current database error.

Note:
This is used by storePath().

Definition at line 864 of file ezurlaliasml.php.

Referenced by storePath().

static eZURLAliasML::definition ( ) [static]
Returns:
the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields - an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys - an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes - an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions - an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key - the field which is incremented on table inserts.
  • class_name - the classname which is used for instantiating new objecs when fetching from the database.
  • sort - an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either asc or desc.
  • name - the name of the database table

Example:

static function definition()
{
    return array( "fields" => array( "id" => "ID",
                                     "version" => "Version",
                                     "name" => "Name" ),
                  "keys" => array( "id", "version" ),
                  "function_attributes" => array( "current" => "currentVersion",
                                                  "class_name" => "className" ),
                  "increment_key" => "id",
                  "class_name" => "eZContentClass",
                  "sort" => array( "id" => "asc" ),
                  "name" => "ezcontentclass" );
}

Reimplemented from eZPersistentObject.

Definition at line 109 of file ezurlaliasml.php.

eZURLAliasML::eZURLAliasML ( row)

Initializes a new URL alias from database row.

Note:
If 'path' is set it will be cached in $Path.

Definition at line 99 of file ezurlaliasml.php.

Referenced by create(), removeSingleEntry(), and storePath().

static eZURLAliasML::fetchByAction ( actionName,
actionValue,
maskLanguages = false,
onlyPrioritized = false,
includeRedirections = false 
) [static]

Fetches real path element(s) which matches the action name $actionName and value $actionValue.

Lets say we have the following elements:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     2   6    0      'spam'      'eznode:55'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     5   5    3      'repairman' 'eznode:42'
     6   6    3      'repoman'   'eznode:55'
     === ==== ====== =========== ==========

then we try to fetch a specific action:

     $elements = eZURLAliasML::fetchByAction( 'eznode', 5 );

it would return:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     3   3    0      'bicycle'   'eznode:5'
     === ==== ====== =========== ==========

Now let's try with an element which is redirecting:

     $elements = eZURLAliasML::fetchByAction( 'eznode', 10 );

it would return:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     2   6    0      'spam'      'eznode:55'
     === ==== ====== =========== ==========

Definition at line 920 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\adjustPathElement(), ezpLanguageSwitcher\destinationUrl(), eZStaticCache\generateNodeListCache(), and eZContentObjectTreeNode\updateSubTreePath().

static eZURLAliasML::fetchByParentID ( id,
maskLanguages = false,
onlyPrioritized = false,
includeRedirections = true 
) [static]

Fetches path element(s) which matches the parent ID $id.

Lets say we have the following elements:

=== ==== ====== =========== ========== id link parent text action === ==== ====== =========== ========== 1 1 0 'ham' 'eznode:4' 2 6 0 'spam' 'eznode:55' 3 3 0 'bicycle' 'eznode:5' 4 4 0 'superman' 'nop:' 5 5 3 'repairman' 'eznode:42' 6 6 3 'repoman' 'eznode:55' === ==== ====== =========== ==========

then we try to fetch a specific ID:

it would return (ie. no redirections):

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     === ==== ====== =========== ==========

Now let's try with an element which is redirecting:

     $includeRedirections = true;
     eZURLAliasML::fetchByParentID( 0, false, false, $includeRedirections );

it would return:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     2   6    0      'spam'      'eznode:55'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     === ==== ====== =========== ==========

Definition at line 1002 of file ezurlaliasml.php.

Referenced by eZStaticCache\generateCache(), and getChildren().

static eZURLAliasML::fetchByPath ( uriString,
glob = false 
) [static]

Fetches the path element(s) which has the path $uriString. If $glob is set it will use $uriString as the folder to search in and $glob as the starting text to match against.

Lets say we have the following elements:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     2   6    0      'spam'      'eznode:55'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     5   5    3      'repairman' 'eznode:42'
     6   6    3      'repoman'   'eznode:55'
     === ==== ====== =========== ==========

Then we try to fetch a specific path:

     $elements = eZURLAliasML::fetchByPath( "bicycle/repairman" );

we would get:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     5   5    3      'repairman' 'eznode:42'
     === ==== ====== =========== ==========
     $elements = eZURLAliasML::fetchByPath( "bicycle", "rep" ); // bicycle/rep*

we would get:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     5   5    3      'repairman' 'eznode:42'
     6   6    3      'repoman'   'eznode:55'
     === ==== ====== =========== ==========

Definition at line 1202 of file ezurlaliasml.php.

Referenced by fetchNodeIDByPath(), eZStaticCache\generateCache(), and eZSSLZone\getSSLZones().

static eZURLAliasML::fetchNodeIDByPath ( uriString,
glob = false 
) [static]

The same as 'fetchByPath' but extracting nodeID from action. Only first entry will be processed if 'fetchByPath' returns multiple result(e.g. $glob is wildcard).

Returns:
nodeID on success or false otherwise.

Definition at line 1345 of file ezurlaliasml.php.

Referenced by eZTemplateCacheBlock\decodeNodeID(), ezpLanguageSwitcher\destinationUrl(), eZWebDAVContentServer\fetchNodeByTranslation(), and eZWebDAVContentBackend\fetchNodeByTranslation().

static eZURLAliasML::fetchPathByActionList ( actionName,
actionValues,
locale = null 
) [static]

Fetches the path string based on the action $actionName and the values $actionValues. The first entry in $actionValues would be the top-most path element in the path the second entry the child of the first path element and so on.

Lets say we have the following elements:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     2   6    0      'spam'      'eznode:55'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     5   5    3      'repairman' 'eznode:42'
     6   6    3      'repoman'   'eznode:55'
     === ==== ====== =========== ==========

then we try to fetch a specific ID:

     $path = eZURLAliasML::fetchPathByActionList( 'eznode', array( 3, 5 ) );

it would return:

     'bicycle/repairman'
Note:
This function is faster than getPath() since it can fetch all elements in one SQL.
If the fetched elements does not point to each other (parent/id) then null is returned.

Definition at line 1056 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\pathWithNames().

static eZURLAliasML::filterRows ( rows,
onlyPrioritized 
) [static, private]

Filters the DB rows $rows by selecting the most prioritized row per path element and returns the new row list.

Parameters:
$onlyPrioritizedIf false all rows are returned, if true filtering is performed.

Definition at line 1929 of file ezurlaliasml.php.

Referenced by fetchByAction(), and fetchByParentID().

static eZURLAliasML::findUniqueText ( parentElementID,
text,
action,
linkCheck = false,
languageID = false 
) [static]

Checks if the text entry $text is unique on the current level in the URL path. If not the name is adjusted with a number at the end until it becomes unique. The unique text string is returned.

Parameters:
$textThe text element which is to be checked
$actionThe action string which is to be excluded from the check. Set to empty string to disable the exclusion.
$linkCheckIf true then it will see all existing entries as taken.

Definition at line 1777 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\adjustPathElement().

static eZURLAliasML::generateCond ( table,
prevTable,
i,
langMask,
element 
) [static, private]

Generates WHERE part of SQL based on table $table, previous table $prevTable, counter $i, language mask $langMask and text $element.

Definition at line 2123 of file ezurlaliasml.php.

Referenced by fetchByPath().

static eZURLAliasML::generateFullSelect ( table) [static, private]

Generates full SELECT part of SQL based on table $table.

Definition at line 2112 of file ezurlaliasml.php.

Referenced by fetchByPath().

static eZURLAliasML::generateGlobCond ( table,
prevTable,
i,
langMask,
glob 
) [static, private]

Generates WHERE part of SQL for a wildcard match based on table $table, previous table $prevTable, counter $i, language mask $langMask and wildcard text $glob.

Note:
$glob does not contain the wildcard character * but only the beginning of the matching text.

Definition at line 2143 of file ezurlaliasml.php.

Referenced by fetchByPath().

static eZURLAliasML::generateSelect ( table,
i,
len 
) [static, private]

Generates partial SELECT part of SQL based on table $table, counter $i and total length $len.

Definition at line 2094 of file ezurlaliasml.php.

Referenced by fetchByPath().

eZURLAliasML::getChildren ( )

Finds all the children of the current element.

For more control over the list use fetchByParentID().

Definition at line 335 of file ezurlaliasml.php.

static eZURLAliasML::getNewID ( ) [static]

Definition at line 2290 of file ezurlaliasml.php.

Referenced by store(), and storePath().

eZURLAliasML::getPath ( locale = null,
incomingLanguageList = null 
)

Calculates the full path for the current item and returns it.

Parameters:
$localeThe locale for which a path should be calculated.
$incomingLanguageListArray of locale codes representing the prioritized site language list.
Note:
If you know the action values of the path use fetchPathByActionList() instead, it is more optimized.
The calculated path is cached in $Path.

Definition at line 349 of file ezurlaliasml.php.

static eZURLAliasML::languageScore ( mask) [static, private]

Calculates the score of the language mask $mask based upon the currently prioritized languages and returns it.

Note:
The higher the value the more the language is prioritized.

Definition at line 1961 of file ezurlaliasml.php.

Referenced by choosePrioritizedRow().

static eZURLAliasML::md5 ( db,
text,
escape = true 
) [static, private]

Wraps a database md5 call around the string $text and returns the new SQL for it.

Parameters:
$escapeIf true it will lowercase the text and escape it.
Note:
If the database is Oracle and the text is empty the MD5 is computed by PHP and returned.

Definition at line 2279 of file ezurlaliasml.php.

Referenced by create(), findUniqueText(), generateCond(), setAttribute(), store(), storePath(), and translate().

static eZURLAliasML::nodeIDFromAction ( action) [static]

Grabs nodeID from action string.

Returns:
nodeID on success, false otherwise.

Definition at line 2261 of file ezurlaliasml.php.

Referenced by fetchNodeIDByPath().

static eZURLAliasML::removeByAction ( actionName,
actionValue 
) [static]

Removes all path elements which matches the action name $actionName and value $actionValue.

Definition at line 270 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\removeThis().

static eZURLAliasML::removeSingleEntry ( parentID,
textMD5,
language 
) [static]

Removes a URL-Alias which has parent $parentID, MD5 text $textMD5 and language $language. If the entry has only the specified language and there are existing children the entry will be disabled instead of removed. If the entry has other languages other than the one which was specified the language bit is removed.

Parameters:
$parentIDID of the parent element
$textMD5MD5 of the lowercase version of the text, see eZURLAliasML::strtolower().
$languageThe language entry to remove, can be a string with the locale or a language object (eZContentLanguage).

Definition at line 289 of file ezurlaliasml.php.

Referenced by eZContentObject\removeTranslation().

static eZURLAliasML::reverseTranslate ( &$  uri,
uriString,
internalURIString 
) [static]

Perform reverse translation of uri, that is from system-url to url alias.

Definition at line 1677 of file ezurlaliasml.php.

Referenced by translate().

static eZURLAliasML::sanitizeURL ( url) [static]

Transform a semi-valid url into one that can be stored in the url-alias system. Removes leading/trailing slashes and repeated slashes.

     echo eZURLAliasML::sanitizeURL( "" ); // Result ""
     echo eZURLAliasML::sanitizeURL( "users//the_dude" ); // Result "users/the_dude"
     echo eZURLAliasML::sanitizeURL( "archive/products/" ); // Result "archive/products"
Returns:
the sanitized URL

Definition at line 2083 of file ezurlaliasml.php.

eZURLAliasML::setAttribute ( name,
value 
)

Overrides the default behaviour to automatically update TextMD5.

Reimplemented from eZPersistentObject.

Definition at line 218 of file ezurlaliasml.php.

static eZURLAliasML::setLangMaskAlwaysAvailable ( langID,
actionName,
actionValue 
) [static]

Updates the lang_mask field for path elements which matches action $actionName and value $actionValue. If $langID is false then bit 0 (the *always available* bit) will be removed, otherwise it will set bit 0 for the chosen language and remove it for other languages.

Definition at line 1836 of file ezurlaliasml.php.

Referenced by eZContentObject\setAlwaysAvailableLanguageID().

eZURLAliasML::store ( fieldFilters = null)

Generates the md5 for the alias and stores the values.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Reimplemented from eZPersistentObject.

Definition at line 236 of file ezurlaliasml.php.

static eZURLAliasML::storePath ( path,
action,
languageName = false,
linkID = false,
alwaysAvailable = false,
rootID = false,
cleanupElements = true,
autoAdjustName = false,
reportErrors = true,
aliasRedirects = true 
) [static]

Stores the full path $path to point to action $action, any missing parents are created as placeholders (ie. nop:).

Returns an array containing the entry 'status' which is the status code, is true if all went well, a number otherwise (see class constants). Will contain 'path' for succesful creation or if the path already exists.

Parameters:
$pathString containing full path, leading and trailing slashes are stripped.
$actionAction string for entry.
$languageNameThe language to use for entry, can be a string (locale code, e.g. 'nor-NO') an eZContentLanguage object or false for the top prioritized language.
$linkIDNumeric ID for link field, if it is set to false the entry will point to itself. Use this for redirections. Use true if you want to create an link/alias which points to a module (ie. no entry in urlalias table).
$alwaysAvailableIf true the entry will be available in any language.
$rootIDID of the parent element to start at, use 0/false for the very top.
$cleanupElementsIf true each element in the path will be cleaned up according to the current URL transformation rules.
$autoAdjustNameIf true it will adjust the name until it is unique in the path. Used together with $linkID.
$reportErrorsIf true it will report found errors using eZDebug, if false errors are only return in 'status'.
$aliasRedirectsIf true and an alias is being stored it will redirect (using HTTP 301) to it's destination.

Definition at line 416 of file ezurlaliasml.php.

Referenced by eZContentObjectTreeNode\updateSubTreePath().

static eZURLAliasML::strtolower ( text) [static]

Unicode-aware strtolower, performs the conversion by using eZCharTransform

Definition at line 166 of file ezurlaliasml.php.

Referenced by md5().

static eZURLAliasML::translate ( &$  uri,
reverse = false 
) [static]

Transforms the URI if there exists an alias for it, the new URI is replaced in $uri.

Returns:
true is if successful, false otherwise
The string with new url is returned if the translation was found, but the resource has moved.

Lets say we have the following elements:

     === ==== ====== =========== ==========
     id  link parent text        action
     === ==== ====== =========== ==========
     1   1    0      'ham'       'eznode:4'
     2   6    0      'spam'      'eznode:55'
     3   3    0      'bicycle'   'eznode:5'
     4   4    0      'superman'  'nop:'
     5   5    3      'repairman' 'eznode:42'
     6   6    3      'repoman'   'eznode:55'
     === ==== ====== =========== ==========

then we try to translate a path:

     $uri = "bicycle/repairman";
     $result = eZURLAliasML::translate( $uri );
     if ( $result )
     {
         echo $result, "\n";
         echo $uri, "\n";
     }

we would get:

     '1'
     'content/view/full/42'

If we then were to try:

     $uri = "spam";
     $result = eZURLAliasML::translate( $uri );
     if ( $result )
     {
         echo $result, "\n";
         echo $uri, "\n";
     }

we would get:

     'bicycle/repoman'
     'error/301'

Trying a non-existing path:

     $uri = "spam/a-lot";
     $result = eZURLAliasML::translate( $uri );
     if ( $result )
     {
         echo $result, "\n";
         echo $uri, "\n";
     }

then $result would be empty:

Alterntively we can also do a reverse lookup:

     $uri = "content/view/full/55";
     $result = eZURLAliasML::translate( $uri, true );
     if ( $result )
     {
         echo $result, "\n";
         echo $uri, "\n";
     }

we would get:

     '1'
     'bicycle/repoman'

Definition at line 1440 of file ezurlaliasml.php.

Referenced by eZWebDAVContentServer\fetchParentNodeByTranslation(), eZWebDAVContentBackend\fetchParentNodeByTranslation(), eZHTTPHeader\headerOverrideArray(), and eZURLWildcard\translate().

static eZURLAliasML::urlToAction ( url) [static]

Takes the url string $url and returns the action string for it.

The following path are supported:

  • content/view/full/<nodeID> => eznode:<nodeID>

If the url points to an existing module it will return module:<url>

Returns:
false if the action could not be figured out.

Definition at line 2045 of file ezurlaliasml.php.

Referenced by reverseTranslate().

static eZURLAliasML::urlTranslationEnabledByUri ( eZURI uri) [static]

Checks if url translation should be used on the current url.

Parameters:
$uriThe current eZUri object

Definition at line 1746 of file ezurlaliasml.php.


Member Data Documentation

eZURLAliasML::$charset = null [static, private]

Definition at line 93 of file ezurlaliasml.php.

eZURLAliasML::$Path

Optionally computed path string for this element, used for caching purposes.

Definition at line 92 of file ezurlaliasml.php.

Definition at line 86 of file ezurlaliasml.php.

Definition at line 87 of file ezurlaliasml.php.

Definition at line 85 of file ezurlaliasml.php.

Definition at line 83 of file ezurlaliasml.php.

Referenced by storePath().

Definition at line 84 of file ezurlaliasml.php.

Referenced by storePath().


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