本文整理汇总了PHP中Opus_Document::addTitleAbstract方法的典型用法代码示例。如果您正苦于以下问题:PHP Opus_Document::addTitleAbstract方法的具体用法?PHP Opus_Document::addTitleAbstract怎么用?PHP Opus_Document::addTitleAbstract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::addTitleAbstract方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// damn API. $doc->addPersonSubmiter() doesn't work for link models!
// -> we should change this in 4.x
$submitter = new Opus_Person();
$submitter->setFirstName('Donald')->setLastName('Duck')->setEmail('donald@example.org')->setDateOfBirth('1920-03-13')->setPlaceOfBirth('Entenhausen');
$doc->addPersonSubmitter($submitter);
$author = new Opus_Person();
$author->setFirstName('Daniel')->setLastName('Düsentrieb')->setAcademicTitle('Dr.-Ing.');
$doc->addPersonAuthor($author);
$doc->setLanguage('deu');
$titleMain = $doc->addTitleMain();
$titleMain->setValue('Dokument zur empirischen Unterschung der OAI-Schnittstelle');
$titleMain->setLanguage('deu');
$titleMainEng = $doc->addTitleMain();
$titleMainEng->setValue('Document for empirical testing OAI interface');
$titleMainEng->setLanguage('eng');
$abstract = $doc->addTitleAbstract();
$abstract->setValue('Dokument, dass alle Daten enhält, um testen zu können, wie die OAI-Schnittstelle sie ausgibt.');
$abstract->setLanguage('deu');
$titleSub = $doc->addTitleSub();
$titleSub->setValue('Beispielhaft erleutert an OPUS 4.0.0');
$titleSub->setLanguage('deu');
$titleAdditional = $doc->addTitleAdditional();
$titleAdditional->setValue('OAI-Schnittstellen empirisch testen am Beispiel von OPUS 4.0');
$titleAdditional->setLanguage('deu');
$titleParent = $doc->addTitleParent();
$titleParent->setValue('Tester interface d\'OAI en OPUS 4.0');
$titleParent->setLanguage('fra');
$doc->setPageNumber('123');
$doc->setPageFirst('122');
$doc->setPageLast('124');
$doc->setVolume('4');
示例2: handleAbstracts
/**
*
* @param DOMNode $node
* @param Opus_Document $doc
*/
private function handleAbstracts($node, $doc)
{
foreach ($node->childNodes as $childNode) {
if ($childNode instanceof DOMElement) {
$t = $doc->addTitleAbstract();
$t->setValue(trim($childNode->textContent));
$t->setLanguage(trim($childNode->getAttribute('language')));
}
}
}