本文整理匯總了PHP中Annotation::setQuoteAuthor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Annotation::setQuoteAuthor方法的具體用法?PHP Annotation::setQuoteAuthor怎麽用?PHP Annotation::setQuoteAuthor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Annotation
的用法示例。
在下文中一共展示了Annotation::setQuoteAuthor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: recordToAnnotation
function recordToAnnotation($r)
{
$annotation = new Annotation();
$annotation->setAnnotationId($r->id);
$annotation->setUserId($r->userid);
if ($r->access) {
$annotation->setAccess($r->access);
}
if ($r->url) {
$annotation->setUrl($r->url);
}
if ($r->note) {
$annotation->setNote($r->note);
}
if ($r->quote) {
$annotation->setQuote($r->quote);
}
if ($r->quote_title) {
$annotation->setQuoteTitle($r->quote_title);
}
if ($r->quote_author) {
$annotation->setQuoteAuthor($r->quote_author);
}
if ($r->link) {
$annotation->setLink($r->link);
}
if ($r->link_title) {
$annotation->setLinkTitle($r->link_title);
}
$annotation->setCreated($r->created);
if ($r->start_block !== null) {
$range = new SequenceRange();
$range->setStart(new SequencePoint($r->start_block, $r->start_word, $r->start_char));
$range->setEnd(new SequencePoint($r->end_block, $r->end_word, $r->end_char));
$annotation->setSequenceRange($range);
} else {
if (!empty($r->range)) {
$range = new SequenceRange();
$range->fromString($r->range);
$annotation->setSequenceRange($range);
}
}
if ($r->start_xpath !== null) {
$range = new XPathRange();
$range->setStart(new XPathPoint($r->start_xpath, $r->start_word, $r->start_char));
$range->setEnd(new XpathPoint($r->end_xpath, $r->end_word, $r->end_char));
$annotation->setXPathRange($range);
}
return $annotation;
}