li3_docs\extensions\command\Docs::index()
Generates index for registered libraries.
Source
public function index() {
$pdo = Pages::connection()->connection;
$pdo->beginTransaction();
$this->out('Removing all pages and symbols...');
Pages::remove();
Symbols::remove();
foreach (Indexes::find('all') as $index) {
$this->out('Processing index:' . var_export($index->data(), true));
if ($index->type === 'api') {
$this->out('Harvesting symbols...');
if (!Symbols::harvest($index)) {
$this->error('FAILED');
$pdo->rollback();
return false;
}
}
$this->out('Harvesting pages...');
if (!Pages::harvest($index)) {
$this->error('FAILED');
$pdo->rollback();
return false;
}
}
$pdo->commit();
}