require_once "{$includeDir}/XRef.class.php"; // command-line arguments try { list($options, $arguments) = XRef::getCmdOptions(); } catch (Exception $e) { error_log($e->getMessage()); error_log("See 'xref-doc --help'"); exit(1); } //help if (XRef::needHelp() || count($arguments)) { XRef::showHelpScreen("xref-doc - tool to create cross-reference source code reports"); exit(1); } $xref = new XRef(); $xref->setOutputDir(XRef::getConfigValue("doc.output-dir")); $xref->loadPluginGroup("doc"); $plugins = $xref->getPlugins("XRef_IDocumentationPlugin"); $path = XRef::getConfigValue("project.source-code-dir"); $file_provider = new XRef_FileProvider_FileSystem($path); $exclude_paths = XRef::getConfigValue("project.exclude-path", array()); $file_provider->excludePaths($exclude_paths); $numberOfFiles = 0; $numberOfCodeLines = 0; // 1. Call each plugin once for each input file $files = $xref->filterFiles($file_provider->getFiles()); foreach ($files as $filename) { try { $file_content = $file_provider->getFileContent($filename); $pf = $xref->getParsedFile($filename, $file_content); foreach ($plugins as $pluginId => $plugin) {