本文整理匯總了PHP中Indexer::get_nb_indexed_files方法的典型用法代碼示例。如果您正苦於以下問題:PHP Indexer::get_nb_indexed_files方法的具體用法?PHP Indexer::get_nb_indexed_files怎麽用?PHP Indexer::get_nb_indexed_files使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Indexer
的用法示例。
在下文中一共展示了Indexer::get_nb_indexed_files方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: usage
}
$dir_mes = "in data directory " . $indexer->get_data_root();
if ($csv_filename == null) {
$mes = "Indexation of all linguistic data files";
} else {
$mes = "Indexation of the linguistic data file {$csv_filename}";
$indexer->force_indexation();
}
$logger->info("{$mes} {$dir_mes}\n");
if ($csv_filename != null) {
$indexer->index_one_file($csv_filename);
$logger->info("Nb. of morphemes indexed in this pass: " . $indexer->get_nb_indexed_entries());
} else {
$indexer->index_all_files();
$logger->info("Total nb. of data files: " . count($indexer->list_data_files_in_data_directory()));
$logger->info("Nb. files indexed in this pass: " . $indexer->get_nb_indexed_files());
$logger->info("Total nb. of entries: " . count(file($indexer->get_main_index_pathname())));
$logger->info("Nb. entries indexed in this pass: " . $indexer->get_nb_indexed_entries());
}
function usage($message = null)
{
if ($message != null) {
echo "\n*** {$message} ***\n";
}
echo "\nUsage: php makeindex.php [-options] [<csv filename>]";
echo "\n\nwhere options include:";
echo "\n\n";
echo "-h\t\tprint this information\n";
echo "-f\t\tforce indexation\n";
$indexer = new Indexer();
echo "-d <dir>\tindex data files in directory <dir> (defaults to " . $indexer->get_data_root() . ")\n";