本文整理汇总了PHP中eZURI::decodeIRI方法的典型用法代码示例。如果您正苦于以下问题:PHP eZURI::decodeIRI方法的具体用法?PHP eZURI::decodeIRI怎么用?PHP eZURI::decodeIRI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZURI
的用法示例。
在下文中一共展示了eZURI::decodeIRI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setURIString
/**
* Sets uri string for instance
*
* Sets the current URI string to $uri, the URI is then split into array elements
* and index reset to 1.
*
* @param string $uri
* @param boolean $fullInitialize
* @return void
*/
public function setURIString($uri, $fullInitialize = true)
{
if (strlen($uri) > 0 and $uri[0] == '/') {
$uri = substr($uri, 1);
}
$uri = eZURI::decodeIRI($uri);
$this->URI = $uri;
$this->URIArray = explode('/', $uri);
$this->Index = 0;
if (!$fullInitialize) {
return;
}
$this->OriginalURI = $uri;
$this->UserArray = array();
unset($paramName, $paramValue);
foreach (array_keys($this->URIArray) as $key) {
if (!isset($this->URIArray[$key])) {
continue;
}
if (preg_match("/^[\\(][a-zA-Z0-9_]+[\\)]/", $this->URIArray[$key])) {
if (isset($paramName, $paramValue)) {
$this->UserArray[$paramName] = $paramValue;
unset($paramName, $paramValue);
}
$paramName = substr($this->URIArray[$key], 1, strlen($this->URIArray[$key]) - 2);
if (isset($this->URIArray[$key + 1])) {
$this->UserArray[$paramName] = $this->URIArray[$key + 1];
unset($this->URIArray[$key + 1]);
} else {
$this->UserArray[$paramName] = "";
}
unset($this->URIArray[$key]);
} else {
if (isset($paramName)) {
$this->UserArray[$paramName] .= '/' . $this->URIArray[$key];
unset($this->URIArray[$key]);
}
}
}
// Remake the URI without any user parameters
$this->URI = implode('/', $this->URIArray);
if (eZINI::instance('template.ini')->variable('ControlSettings', 'AllowUserVariables') == 'false') {
$this->UserArray = array();
}
// Convert filter string to current locale
$this->convertFilterString();
}