本文整理汇总了PHP中Family::getFamilyMemberAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Family::getFamilyMemberAttributes方法的具体用法?PHP Family::getFamilyMemberAttributes怎么用?PHP Family::getFamilyMemberAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Family
的用法示例。
在下文中一共展示了Family::getFamilyMemberAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadFamilyMembers
private function loadFamilyMembers()
{
$xml = null;
$this->prevFamilyMembers = array();
if ($this->isGedcomPage) {
$dataString = GedcomUtil::getGedcomDataString();
if ($dataString) {
$xml = simplexml_load_string($dataString);
}
} else {
$revision = StructuredData::getRevision($this->title);
if ($revision) {
$content =& $revision->getText();
$xml = StructuredData::getXml('family', $content);
}
}
if (isset($xml)) {
foreach ($xml->husband as $member) {
$title = (string) $member['title'];
$this->prevFamilyMembers[$title] = Family::getFamilyMemberAttributes($member);
}
foreach ($xml->wife as $member) {
$title = (string) $member['title'];
$this->prevFamilyMembers[$title] = Family::getFamilyMemberAttributes($member);
}
foreach ($xml->child as $member) {
$title = (string) $member['title'];
$this->prevFamilyMembers[$title] = Family::getFamilyMemberAttributes($member);
}
}
}
示例2: loadPages
private function loadPages()
{
$this->prevPeople = array();
$this->prevFamilies = array();
$revision = StructuredData::getRevision($this->title);
if ($revision) {
$content =& $revision->getText();
$xml = StructuredData::getXml($this->tagName, $content);
if (isset($xml)) {
foreach ($xml->person as $person) {
$title = (string) $person['title'];
$this->prevPeople[$title] = Family::getFamilyMemberAttributes($person);
}
foreach ($xml->family as $family) {
$title = (string) $family['title'];
$this->prevFamilies[$title] = array();
}
}
}
}