private function generateInventories()
{
$definitions = array('constants' => array('description' => 'List of all defined constants in the code.', 'analyzer' => 'Constants/Constantnames'), 'classes' => array('description' => 'List of all defined classes in the code.', 'analyzer' => 'Classes/Classnames'), 'interfaces' => array('description' => 'List of all defined interfaces in the code.', 'analyzer' => 'Interfaces/Interfacenames'), 'traits' => array('description' => 'List of all defined traits in the code.', 'analyzer' => 'Traits/Traitnames'), 'functions' => array('description' => 'List of all defined functions in the code.', 'analyzer' => 'Functions/Functionnames'), 'namespaces' => array('description' => 'List of all defined namespaces in the code.', 'analyzer' => 'Namespaces/Namespacesnames'), 'exceptions' => array('description' => 'List of all defined exceptions.', 'analyzer' => 'Exceptions/DefinedExceptions'));
foreach ($this->inventories as $fileName => $theTitle) {
$theDescription = $definitions[$fileName]['description'];
$theAnalyzer = $definitions[$fileName]['analyzer'];
$theTable = '';
$res = $this->sqlite->query('SELECT fullcode, file, line FROM results WHERE analyzer="' . $theAnalyzer . '"');
while ($row = $res->fetchArray()) {
$theTable .= "<tr><td>{$row['fullcode']}</td><td>{$row['file']}</td><td>{$row['line']}</td></tr>\n";
}
$html = $this->getBasedPage('inventories');
$html = $this->injectBloc($html, 'TITLE', $theTitle);
$html = $this->injectBloc($html, 'DESCRIPTION', $theDescription);
$html = $this->injectBloc($html, 'TABLE', $theTable);
$this->putBasedPage('inventories_' . $fileName, $html);
}
}