本文整理汇总了PHP中Objects::children方法的典型用法代码示例。如果您正苦于以下问题:PHP Objects::children方法的具体用法?PHP Objects::children怎么用?PHP Objects::children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Objects
的用法示例。
在下文中一共展示了Objects::children方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Objects
$db = db_connect("guest");
if (!$n) {
$n = $_GET['issue'];
}
if ($n < 0) {
die;
}
$oo = new Objects();
// id of the 'journal' object
// all issues are attached to this object,
// and all bulletins are attached to one of those issues
$journal_id = 82553;
$journal_url_base = "/journal";
// treat G-e-s-t-a-l-t differently
$gestalt_id = 77066;
$issues = $oo->children($journal_id);
$issue = $issues[$n];
$id = $issue['id'];
// build the url for this issue
$issue_url = $journal_url_base . "/" . $issue['url'];
// get all of the bulletins for this issue
$bulletins = $oo->children($id);
// randomise the array
shuffle($bulletins);
$i = $n;
foreach ($bulletins as $b) {
// style title and author
$title = strtoupper($b['name1']);
$author = $b['deck'];
$caption = $author . ": " . $title;
// get cover image
示例2: process_md
$ww = new Wires();
$uu = new URL();
// self
if($uu->id)
$item = $oo->get($uu->id);
else
$item = $oo->get(0);
$name = strip_tags($item["name1"]);
// document title
$item = $oo->get($uu->id);
$title = $item["name1"] ? $item["name1"] : "Point";
if ($title == "Point") $home = true;
$now_children = $oo->children(1);
$is_report = false;
if($uu->urls[0] == "annual-reports" && count($uu->urls) == 2)
$is_report = true;
$is_event = false;
if($uu->urls[0] == "annual-reports" && count($uu->urls) == 3)
$is_event = true;
use \Michelf\Markdown;
// $md = new Markdown;
require_once("open-records-generator/lib/Michelf/Markdown.inc.php");
function process_md($b)
示例3: process_md
$ww = new Wires();
$uu = new URL();
// self
if($uu->id)
$item = $oo->get($uu->id);
else
$item = $oo->get(0);
$name = strip_tags($item["name1"]);
// document title
$item = $oo->get($uu->id);
$title = $item["name1"] ? $item["name1"] : "Point";
if ($title == "Point") $is_home = true;
$now_children = $oo->children(1);
$is_report = false;
if($uu->urls[0] == "annual-reports" && count($uu->urls) == 2)
$is_report = true;
$is_event = false;
if($uu->urls[0] == "annual-reports" && count($uu->urls) == 3)
$is_event = true;
use \Michelf\Markdown;
// $md = new Markdown;
require_once("open-records-generator/lib/Michelf/Markdown.inc.php");
function process_md($b)