本文整理汇总了PHP中AJXP_Node::setUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Node::setUrl方法的具体用法?PHP AJXP_Node::setUrl怎么用?PHP AJXP_Node::setUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AJXP_Node
的用法示例。
在下文中一共展示了AJXP_Node::setUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switchAction
//.........这里部分代码省略.........
}
//while (strlen($nodeName = readdir($handle)) > 0) {
foreach ($nodes as $nodeName) {
if ($nodeName == "." || $nodeName == "..") {
continue;
}
if (isset($uniqueFile) && $nodeName != $uniqueFile) {
$cursor++;
continue;
}
if ($offset > 0 && $cursor < $offset) {
$cursor++;
continue;
}
$isLeaf = "";
if (!$this->filterNodeName($path, $nodeName, $isLeaf, $lsOptions)) {
continue;
}
if (RecycleBinManager::recycleEnabled() && $dir == "" && "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
continue;
}
if ($limitPerPage > 0 && $cursor - $offset >= $limitPerPage) {
break;
}
$currentFile = $nonPatchedPath . "/" . $nodeName;
$meta = array();
if ($isLeaf != "") {
$meta = array("is_file" => $isLeaf ? "1" : "0");
}
$node = new AJXP_Node($currentFile, $meta);
$node->setLabel($nodeName);
$node->loadNodeInfo(false, false, $lsOptions["l"] ? "all" : "minimal");
if (!empty($node->metaData["nodeName"]) && $node->metaData["nodeName"] != $nodeName) {
$node->setUrl($nonPatchedPath . "/" . $node->metaData["nodeName"]);
}
if (!empty($node->metaData["hidden"]) && $node->metaData["hidden"] === true) {
continue;
}
if (!empty($node->metaData["mimestring_id"]) && array_key_exists($node->metaData["mimestring_id"], $mess)) {
$node->mergeMetadata(array("mimestring" => $mess[$node->metaData["mimestring_id"]]));
}
if (isset($originalLimitPerPage) && $cursor > $originalLimitPerPage) {
$node->mergeMetadata(array("page_position" => floor($cursor / $originalLimitPerPage) + 1));
}
$nodeType = "d";
if ($node->isLeaf()) {
if (AJXP_Utils::isBrowsableArchive($nodeName)) {
if ($lsOptions["f"] && $lsOptions["z"]) {
$nodeType = "f";
} else {
$nodeType = "z";
}
} else {
$nodeType = "f";
}
}
// There is a special sorting, cancel the reordering of files & folders.
if (isset($orderField) && $orderField != "ajxp_label") {
$nodeType = "f";
}
$fullList[$nodeType][$nodeName] = $node;
$cursor++;
if (isset($uniqueFile) && $nodeName != $uniqueFile) {
break;
}
}