本文整理匯總了PHP中Opus_Document::setPublishedYear方法的典型用法代碼示例。如果您正苦於以下問題:PHP Opus_Document::setPublishedYear方法的具體用法?PHP Opus_Document::setPublishedYear怎麽用?PHP Opus_Document::setPublishedYear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::setPublishedYear方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: myErrorHandler
{
echo "WARNING: myErrorHandler({$errno}, '{$errstr}', '{$errfile}', {$errline})\n";
return true;
}
// set to the user defined error handler
$oldErrorHandler = set_error_handler("myErrorHandler");
//
// Creating document, filling static fields.
//
$doc = new Opus_Document();
$doc->setType(randString($counter++));
$doc->setServerState('published');
$doc->setServerDatePublished('01.01.1900');
$doc->setLanguage('deu' . randString($counter++));
$doc->setThesisDateAccepted('01.02.2003');
$doc->setPublishedYear('2010');
$doc->setPublishedDate('28.09.2010');
$doc->setCompletedYear('2010');
$doc->setCompletedDate('27.09.2010');
$doc->setPublisherName(randString($counter++));
$doc->setPublisherPlace(randString($counter++));
$doc->setPageNumber(randString($counter++));
$doc->setPageFirst(randString($counter++));
$doc->setPageLast(randString($counter++));
$doc->setVolume(randString($counter++));
$doc->setIssue(randString($counter++));
$doc->setCreatingCorporation(randString($counter++));
$doc->setContributingCorporation(randString($counter++));
//
// Persons
//
示例2: updateModel
/**
* Aktualisiert ein Dokument mit den Werten im Formular.
* @param Opus_Document $document
*/
public function updateModel($document)
{
// Language
$value = $this->getElementValue(self::ELEMENT_LANGUAGE);
$document->setLanguage($value);
// Type
$value = $this->getElementValue(self::ELEMENT_TYPE);
$document->setType($value);
$datesHelper = $this->getDatesHelper();
// CompletedDate
$value = $this->getElementValue(self::ELEMENT_COMPLETED_DATE);
$date = $datesHelper->getOpusDate($value);
$document->setCompletedDate($date);
// CompletedYear
$value = $this->getElementValue(self::ELEMENT_COMPLETED_YEAR);
$document->setCompletedYear($value);
// PublishedDate
$value = $this->getElementValue(self::ELEMENT_PUBLISHED_DATE);
$date = $datesHelper->getOpusDate($value);
$document->setPublishedDate($date);
// PublishedYear
$value = $this->getElementValue(self::ELEMENT_PUBLISHED_YEAR);
$document->setPublishedYear($value);
$value = $this->getElementValue(self::ELEMENT_EMBARGO_DATE);
$date = $datesHelper->getOpusDate($value);
$document->setEmbargoDate($date);
}