本文整理汇总了PHP中Opus_Document::setServerDatePublished方法的典型用法代码示例。如果您正苦于以下问题:PHP Opus_Document::setServerDatePublished方法的具体用法?PHP Opus_Document::setServerDatePublished怎么用?PHP Opus_Document::setServerDatePublished使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::setServerDatePublished方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clear
/**
* Publishes documents and adds the given Person as referee.
*
* @param array $docIds
* @param mixed $userId
* @param Opus_Person $person
*
* FIXME capture success or failure for display afterwards
*/
public function clear(array $docIds = null, $userId = null, $person = null)
{
$logger = Zend_Registry::get('Zend_Log');
foreach ($docIds as $docId) {
$logger->debug('Change state to "published" for document: ' . $docId);
$document = new Opus_Document($docId);
$document->setServerState('published');
$date = new Opus_Date();
$date->setNow();
$document->setServerDatePublished($date);
$document->setPublishedDate($date);
$guest_role = Opus_UserRole::fetchByName('guest');
foreach ($document->getFile() as $file) {
$guest_role->appendAccessFile($file->getId());
}
if (isset($person)) {
$document->addPersonReferee($person);
}
$enrichment = $document->addEnrichment();
$enrichment->setKeyName('review.accepted_by')->setValue($userId);
// TODO: Put into same transaction...
$document->store();
$guest_role->store();
}
return;
}
示例2: myErrorHandler
}
// error handler function
function myErrorHandler($errno, $errstr, $errfile, $errline)
{
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++));
示例3:
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details. You should have received a copy of the GNU General Public License
* along with OPUS; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @category Application
* @author Pascal-Nicolas Becker <becker@zib.de>
* @copyright Copyright (c) 2008-2010, OPUS 4 development team
* @license http://www.gnu.org/licenses/gpl.html General Public License
* @version $Id$
*/
$doc = new Opus_Document();
$doc->setType('all');
$doc->setServerState('published');
$doc->setServerDatePublished('1900-01-01');
// 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');