Handles URL aliases in eZ publish. More...
Public Member Functions | |
| asArray () | |
| cacheInfo () | |
| cacheInfoDirectories (&$wildcardCacheDir, &$wildcardCacheFile, &$wildcardCachePath, &$wildcardKeys) | |
| cleanup () | |
| cleanupForwardingURLs ($oldURL) | |
| cleanupWildcards ($baseURL) | |
| convertToAlias ($urlElement, $defaultValue=false) | |
| & | createForForwarding ($forwardURL) |
| createWildcardMatches () | |
| definition () | |
| expireWildcards () | |
| eZURLAlias ($row) | |
| & | forwardURL () |
| & | isWildcardExpired ($timestamp) |
| store () | |
| updateForwardID ($newForwardID, $oldForwardID) | |
Static Public Member Functions | |
| cleanURL ($url) | |
| convertPathToAlias ($pathURL) | |
| create ($sourceURL, $destinationURL, $isInternal=true, $forwardToID=false, $isWildcard=EZ_URLALIAS_WILDCARD_TYPE_NONE) | |
| fetch ($id, $asObject=true) | |
| fetchByDestinationURL ($url, $isInternal=true, $asObject=true) | |
| fetchByOffset ($offset, $limit, $asObject=true) | |
| fetchBySourceURL ($url, $isInternal=true, $asObject=true, $noForwardID=true) | |
| fetchWildcards ($asObject=true) | |
| & | totalCount () |
| translate (&$uri, $reverse=false) | |
| & | translateByWildcard (&$uri, $reverse=false) |
| updateChildAliases ($newPathString, $oldPathString) | |
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.
Creating a new alias is done by using the create() function and passing the correct parameters. Fetching an url can either be done with it's ID using fetch() or by it's URL string by using fetchBySourceURL. To fetch the original URL you must use the translate() function.
Definition at line 57 of file ezurlalias.php.
| eZURLAlias::asArray | ( | ) |
Definition at line 110 of file ezurlalias.php.
| eZURLAlias::cacheInfo | ( | ) |
The array containst the following keys
Definition at line 390 of file ezurlalias.php.
Referenced by cacheInfoDirectories(), and translateByWildcard().
| eZURLAlias::cacheInfoDirectories | ( | &$ | wildcardCacheDir, | |
| &$ | wildcardCacheFile, | |||
| &$ | wildcardCachePath, | |||
| &$ | wildcardKeys | |||
| ) |
Sets the various cache information to the parameters.
Definition at line 411 of file ezurlalias.php.
Referenced by createWildcardMatches().
| eZURLAlias::cleanup | ( | ) |
Removes this url alias as well as all other aliases that relate to it, for instance forwarding aliases.
Definition at line 188 of file ezurlalias.php.
| eZURLAlias::cleanupForwardingURLs | ( | $ | oldURL | ) |
Removes forwarding urls where source_url match $oldURL.
Definition at line 270 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::updateSubTreePath(), and eZContentObjectTreeNode::updateURLAlias().
| eZURLAlias::cleanupWildcards | ( | $ | baseURL | ) |
Removes all wildcards that matches the base URL $baseURL.
Definition at line 254 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::updateSubTreePath(), and eZContentObjectTreeNode::updateURLAlias().
| eZURLAlias::cleanURL | ( | $ | url | ) | [static] |
Makes sure the URL $url does not contain leading and trailing slashes (/).
Definition at line 845 of file ezurlalias.php.
Referenced by create(), fetchByDestinationURL(), fetchBySourceURL(), eZHTTPHeader::headerOverrideArray(), store(), translate(), and translateByWildcard().
| eZURLAlias::convertPathToAlias | ( | $ | pathURL | ) | [static] |
Converts the path $pathURL into a new alias path with limited characters. For more information on the conversion see convertToAlias().
Definition at line 707 of file ezurlalias.php.
Referenced by eZWebDAVContentServer::fetchNodeByTranslation(), and eZWebDAVContentServer::fetchParentNodeByTranslation().
| eZURLAlias::convertToAlias | ( | $ | urlElement, | |
| $ | defaultValue = false | |||
| ) |
Definition at line 681 of file ezurlalias.php.
Referenced by convertPathToAlias(), and eZContentObjectTreeNode::pathWithNames().
| eZURLAlias::create | ( | $ | sourceURL, | |
| $ | destinationURL, | |||
| $ | isInternal = true, |
|||
| $ | forwardToID = false, |
|||
| $ | isWildcard = EZ_URLALIAS_WILDCARD_TYPE_NONE | |||
| ) | [static] |
Creates a new URL alias with the new URL $sourceURL and the original URL $destinationURL
| $isInternal | decides if the url is internal or not (user created). |
Definition at line 140 of file ezurlalias.php.
Referenced by createForForwarding().
| & eZURLAlias::createForForwarding | ( | $ | forwardURL | ) |
Creates a new URL alias which will forward the to this URL alias, the url which will be forwarded is $forwardURL. The forwarding URL is usually an old url you want to work with your new and renamed url. The difference between a forwarding and translation is that forwarding will the browser and crawlers that the url is no longer in use and give the new one.
Definition at line 163 of file ezurlalias.php.
| eZURLAlias::createWildcardMatches | ( | ) |
Goes trough all wildcards in the database and creates the wildcard match cache.
Definition at line 424 of file ezurlalias.php.
Referenced by translateByWildcard().
| eZURLAlias::definition | ( | ) |
Reimplemented from eZPersistentObject.
Definition at line 70 of file ezurlalias.php.
Referenced by fetch(), fetchByDestinationURL(), fetchByOffset(), fetchBySourceURL(), and fetchWildcards().
| eZURLAlias::expireWildcards | ( | ) |
Expires the wildcard cache. This causes the wildcard cache to be regenerated on the next page load.
Definition at line 520 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::updateSubTreePath().
| eZURLAlias::eZURLAlias | ( | $ | row | ) |
| eZURLAlias::fetch | ( | $ | id, | |
| $ | asObject = true | |||
| ) | [static] |
Fetches the URL alias by ID.
Definition at line 305 of file ezurlalias.php.
Referenced by forwardURL(), translate(), and translateByWildcard().
| eZURLAlias::fetchByDestinationURL | ( | $ | url, | |
| $ | isInternal = true, |
|||
| $ | asObject = true | |||
| ) | [static] |
Fetches the URL alias by destination URL $url.
| $isInternal | boolean which controls whether internal or external urls are fetched. |
null Definition at line 341 of file ezurlalias.php.
| eZURLAlias::fetchByOffset | ( | $ | offset, | |
| $ | limit, | |||
| $ | asObject = true | |||
| ) | [static] |
Fetches non-internal URL alias by offset and limit
Definition at line 357 of file ezurlalias.php.
| eZURLAlias::fetchBySourceURL | ( | $ | url, | |
| $ | isInternal = true, |
|||
| $ | asObject = true, |
|||
| $ | noForwardID = true | |||
| ) | [static] |
Fetches the URL alias by source URL $url.
| $isInternal | boolean which controls whether internal or external urls are fetched. | |
| $noForwardID | boolean which controls whether to only fetch urls without forward id or if forward id it should be ignored. |
null Definition at line 321 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::remove(), translate(), translateByWildcard(), eZContentObjectTreeNode::updateSubTreePath(), and eZContentObjectTreeNode::updateURLAlias().
| eZURLAlias::fetchWildcards | ( | $ | asObject = true |
) | [static] |
Fetches all wildcards from DB.
Definition at line 371 of file ezurlalias.php.
Referenced by createWildcardMatches().
| & eZURLAlias::forwardURL | ( | ) |
null if no such URL exists. Definition at line 124 of file ezurlalias.php.
| & eZURLAlias::isWildcardExpired | ( | $ | timestamp | ) |
Definition at line 503 of file ezurlalias.php.
Referenced by translateByWildcard().
| eZURLAlias::store | ( | ) |
Generates the md5 for the alias and stores the values.
Definition at line 175 of file ezurlalias.php.
| & eZURLAlias::totalCount | ( | ) | [static] |
Counts the non-internal URL alias
Definition at line 656 of file ezurlalias.php.
| eZURLAlias::translate | ( | &$ | uri, | |
| $ | reverse = false | |||
| ) | [static] |
Transforms the URI if there exists an alias for it.
true is if successful, false otherwise Definition at line 728 of file ezurlalias.php.
Referenced by eZWebDAVContentServer::fetchNodeByTranslation(), eZWebDAVContentServer::fetchParentNodeByTranslation(), and eZHTTPHeader::headerOverrideArray().
| & eZURLAlias::translateByWildcard | ( | &$ | uri, | |
| $ | reverse = false | |||
| ) | [static] |
Transforms the URI if there exists an alias for it.
true is if successful, false otherwise Definition at line 534 of file ezurlalias.php.
| eZURLAlias::updateChildAliases | ( | $ | newPathString, | |
| $ | oldPathString | |||
| ) | [static] |
Makes sure all aliases which are children of the alias $oldPathString is updated to have the correct $newPathString.
Definition at line 206 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::updateSubTreePath().
| eZURLAlias::updateForwardID | ( | $ | newForwardID, | |
| $ | oldForwardID | |||
| ) |
Updates all forwards urls that originally points to $oldForwardID to point to correct url $newForardID.
Definition at line 287 of file ezurlalias.php.
Referenced by eZContentObjectTreeNode::updateSubTreePath(), and eZContentObjectTreeNode::updateURLAlias().
1.6.3