本文整理匯總了PHP中Objects::ancestors方法的典型用法代碼示例。如果您正苦於以下問題:PHP Objects::ancestors方法的具體用法?PHP Objects::ancestors怎麽用?PHP Objects::ancestors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Objects
的用法示例。
在下文中一共展示了Objects::ancestors方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Media
$mm = new Media();
$ww = new Wires();
$uu = new URL();
$rr = new Request();
$js_back = "javascript:history.back();";
// self
$item = $oo->get($uu->id);
// am i using the ternary operator correctly?
// if this url has an id, get the associated object,
// else, get the root object
$name = $item ? strip_tags($item["name1"]) : false;
// document title
$title = $db_name . " | " . $name;
// $nav = $oo->nav_clean($uu->ids);
// used in add.php, edit.php, browse.php
$ancestors = $oo->ancestors($uu->id);
?>
<!DOCTYPE html>
<html>
<head>
<title><?php
echo $title;
?>
</title>
<meta charset="utf-8">
<meta name="description" content="anglophile">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="<?php
echo $admin_path;
?>
media/icon.png">