本文整理汇总了PHP中Opus_Document::getAllIds方法的典型用法代码示例。如果您正苦于以下问题:PHP Opus_Document::getAllIds方法的具体用法?PHP Opus_Document::getAllIds怎么用?PHP Opus_Document::getAllIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Opus_Document
的用法示例。
在下文中一共展示了Opus_Document::getAllIds方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
if ($this->documentImported) {
$ids = Opus_Document::getAllIds();
$last_id = array_pop($ids);
$doc = new Opus_Document($last_id);
$doc->deletePermanent();
}
parent::tearDown();
}
示例2: define
define('APPLICATION_ENV', 'production');
// basic bootstrapping
require_once dirname(__FILE__) . '/../common/bootstrap.php';
$config = Zend_Registry::get('Zend_Config');
$host = $config->searchengine->solr->host;
$port = $config->searchengine->solr->port;
$baseUri = $config->searchengine->solr->path;
$EOL = "\n";
$commitRange = 100;
$solr = new Apache_Solr_Service($host, $port, $baseUri);
if (false === $solr->ping()) {
echo 'Could not connect to solr service.' . $EOL;
return;
}
$startTime = time();
$docIds = Opus_Document::getAllIds();
$documents = array();
$conf = Zend_Registry::get('Zend_Config');
$baseFilePath = null;
if (true === isset($conf->file->destinationPath) and true === is_dir($conf->file->destinationPath)) {
$baseFilePath = $conf->file->destinationPath;
}
foreach ($docIds as $docId) {
printMessage(' Indexing document : ' . $docId);
$opusDoc = new Opus_Document($docId);
$solrDocument = Qucosa_Search_Solr_Document_OpusDocument::loadOpusDocument($opusDoc);
if (null !== $baseFilePath and 'published' === $opusDoc->getServerState()) {
$files = $opusDoc->getFile();
if (false === is_array($files)) {
$files = array($files);
}