diff --git a/phpdotnet/phd/Config.php b/phpdotnet/phd/Config.php index 4a49b2d..688525f 100644 --- a/phpdotnet/phd/Config.php +++ b/phpdotnet/phd/Config.php @@ -7,61 +7,61 @@ class Config public readonly string $copyright; /** @var array */ - public array $output_format = []; - public bool $no_index = false; - public bool $force_index = false; - public bool $no_toc = false; - public string $xml_root = '.'; - public string $xml_file = './.manual.xml'; - public string $history_file = './fileModHistory.php'; - public string $lang_dir = './'; + public array $outputFormat = []; + public bool $noIndex = false; + public bool $forceIndex = false; + public bool $noToc = false; + public string $xmlRoot = '.'; + public string $xmlFile = './.manual.xml'; + public string $historyFile = './fileModHistory.php'; + public string $langDir = './'; public string $language = 'en'; - public string $fallback_language = 'en'; + public string $fallbackLanguage = 'en'; public int $verbose = VERBOSE_DEFAULT; - public string $date_format = 'H:i:s'; + public string $dateFormat = 'H:i:s'; /** @var array */ - public array $render_ids = []; + public array $renderIds = []; /** @var array */ - public array $skip_ids = []; - private bool $color_output = true; - public string $output_dir = './output/'; - public string $output_filename = ''; + public array $skipIds = []; + private bool $colorOutput = true; + public string $outputDir = './output/'; + public string $outputFilename = ''; /** @var resource */ - public $php_error_output = \STDERR; - public string $php_error_color = '01;31'; // Red + public $phpErrorOutput = \STDERR; + public string $phpErrorColor = '01;31'; // Red /** @var resource */ - public $user_error_output = \STDERR; - public string $user_error_color = '01;33'; // Yellow + public $userErrorOutput = \STDERR; + public string $userErrorColor = '01;33'; // Yellow /** @var resource */ - public $phd_info_output = \STDOUT; - public string $phd_info_color = '01;32'; // Green + public $phdInfoOutput = \STDOUT; + public string $phdInfoColor = '01;32'; // Green /** @var resource */ - public $phd_warning_output = \STDOUT; - public string $phd_warning_color = '01;35'; // Magenta + public $phdWarningOutput = \STDOUT; + public string $phdWarningColor = '01;35'; // Magenta public string $highlighter = 'phpdotnet\\phd\\Highlighter'; /** @var array */ public array $package =['Generic']; /** @var array $css */ public array $css = []; - public bool $process_xincludes = false; + public bool $processXincludes = false; public ?string $ext = null; /** @var array */ - public array $package_dirs = [__INSTALLDIR__]; - public bool $saveconfig = false; + public array $packageDirs = [__INSTALLDIR__]; + public bool $saveConfig = false; public bool $quit = false; - public ?IndexRepository $indexcache = null; - public bool $memoryindex = false; + public ?IndexRepository $indexCache = null; + public bool $memoryIndex = false; - public string $phpweb_version_filename = ''; - public string $phpweb_acronym_filename = ''; - public string $phpweb_sources_filename = ''; - public string $phpweb_history_filename = ''; + public string $phpwebVersionFilename = ''; + public string $phpwebAcronymFilename = ''; + public string $phpwebSourcesFilename = ''; + public string $phpwebHistoryFilename = ''; public function __construct() { $this->copyright = 'Copyright(c) 2007-' . \date('Y') . ' The PHP Documentation Group'; if('WIN' === \strtoupper(\substr(\PHP_OS, 0, 3))) { - $this->color_output = false; + $this->colorOutput = false; } } @@ -98,7 +98,7 @@ class Config */ public function getSupportedPackages(): array { $packageList = []; - foreach($this->package_dirs as $dir) { + foreach($this->packageDirs as $dir) { foreach (\glob($dir . "/phpdotnet/phd/Package/*", \GLOB_ONLYDIR) as $item) { $baseitem = \basename($item); if ($baseitem[0] !== '.') { @@ -112,30 +112,30 @@ class Config /** * Returns whether terminal output supports colors */ - public function getColor_output(): bool { - return $this->color_output; + public function getColorOutput(): bool { + return $this->colorOutput; } /** * Enables/disables color output on the terminal */ - public function setColor_output(bool $color_output): void { + public function setColorOutput(bool $colorOutput): void { // Disable colored output if the terminal doesn't support colors - if ($color_output && function_exists('posix_isatty')) { - if (!posix_isatty($this->phd_info_output)) { - $this->phd_info_color = false; + if ($colorOutput && function_exists('posix_isatty')) { + if (!posix_isatty($this->phdInfoOutput)) { + $this->phdInfoColor = false; } - if (!posix_isatty($this->phd_warning_output)) { - $this->phd_warning_color = false; + if (!posix_isatty($this->phdWarningOutput)) { + $this->phdWarningColor = false; } - if (!posix_isatty($this->php_error_output)) { - $this->php_error_color = false; + if (!posix_isatty($this->phpErrorOutput)) { + $this->phpErrorColor = false; } - if (!posix_isatty($this->user_error_output)) { - $this->user_error_color = false; + if (!posix_isatty($this->userErrorOutput)) { + $this->userErrorColor = false; } } - $this->color_output = $color_output; + $this->colorOutput = $colorOutput; } /** @@ -152,27 +152,27 @@ class Config * @return boolean True if indexing is required. */ public function requiresIndexing(): bool { - if (! $this->indexcache) { - $indexfile = $this->output_dir . 'index.sqlite'; + if (! $this->indexCache) { + $indexfile = $this->outputDir . 'index.sqlite'; if (!\file_exists($indexfile)) { return true; } } - if ($this->no_index) { + if ($this->noIndex) { return false; } - if ($this->force_index) { + if ($this->forceIndex) { return true; } - if ($this->indexcache->getIndexingTimeCount() === 0) { + if ($this->indexCache->getIndexingTimeCount() === 0) { return true; } - $xmlLastModification = \filemtime($this->xml_file); - if ($this->indexcache->getIndexingTime() > $xmlLastModification) { + $xmlLastModification = \filemtime($this->xmlFile); + if ($this->indexCache->getIndexingTime() > $xmlLastModification) { return false; } return true; diff --git a/phpdotnet/phd/Format.php b/phpdotnet/phd/Format.php index 31ee788..16ced84 100644 --- a/phpdotnet/phd/Format.php +++ b/phpdotnet/phd/Format.php @@ -68,8 +68,8 @@ abstract class Format extends ObjectStorage public function __construct(Config $config, OutputHandler $outputHandler) { $this->config = $config; $this->outputHandler = $outputHandler; - if ($this->config->indexcache) { - $this->indexRepository = $this->config->indexcache; + if ($this->config->indexCache) { + $this->indexRepository = $this->config->indexCache; if (!($this instanceof Index)) { $this->sortIDs(); } @@ -337,13 +337,13 @@ abstract class Format extends ObjectStorage if (isset($this->autogen[$lang][$text])) { return $this->autogen[$lang][$text]; } - if ($lang == $this->config->fallback_language) { + if ($lang == $this->config->fallbackLanguage) { throw new \InvalidArgumentException("Cannot autogenerate text for '$text'"); } - return $this->autogen($text, $this->config->fallback_language); + return $this->autogen($text, $this->config->fallbackLanguage); } - $filename = $this->config->lang_dir . $lang . ".ini"; + $filename = $this->config->langDir . $lang . ".ini"; if (!file_exists($filename) && strncmp(basename($filename), 'doc-', 4) === 0) { $filename = dirname($filename) . DIRECTORY_SEPARATOR . substr(basename($filename), 4); diff --git a/phpdotnet/phd/Format/Abstract/XHTML.php b/phpdotnet/phd/Format/Abstract/XHTML.php index 37ba455..a28b59a 100644 --- a/phpdotnet/phd/Format/Abstract/XHTML.php +++ b/phpdotnet/phd/Format/Abstract/XHTML.php @@ -71,12 +71,12 @@ abstract class Format_Abstract_XHTML extends Format { * @return void */ public function postConstruct() { - $this->mediamanager = new MediaManager($this->config->xml_root); + $this->mediamanager = new MediaManager($this->config->xmlRoot); $outputdir = $this->getOutputDir(); if (isset($outputdir) && $outputdir) { $this->mediamanager->output_dir = $outputdir; } else { - $this->mediamanager->output_dir = $this->config->output_dir . '/' . strtolower($this->getFormatName()) . '-data/'; + $this->mediamanager->output_dir = $this->config->outputDir . '/' . strtolower($this->getFormatName()) . '-data/'; $this->mediamanager->relative_ref_path = basename($this->mediamanager->output_dir) . '/'; } } diff --git a/phpdotnet/phd/Options/Handler.php b/phpdotnet/phd/Options/Handler.php index 0d68ee8..e2eda75 100644 --- a/phpdotnet/phd/Options/Handler.php +++ b/phpdotnet/phd/Options/Handler.php @@ -55,7 +55,7 @@ class Options_Handler implements Options_Interface */ public function option_memoryindex(string $k, mixed $v): array { - return ['memoryindex' => true]; + return ['memoryIndex' => true]; } /** @@ -80,7 +80,7 @@ class Options_Handler implements Options_Interface $formats[] = $val; } } - return ['output_format' => $formats]; + return ['outputFormat' => $formats]; } /** @@ -135,7 +135,7 @@ class Options_Handler implements Options_Interface */ public function option_noindex(string $k, mixed $v): array { - return ['no_index' => true]; + return ['noIndex' => true]; } /** @@ -151,7 +151,7 @@ class Options_Handler implements Options_Interface */ public function option_forceindex(string $k, mixed $v): array { - return ['force_index' => true]; + return ['forceIndex' => true]; } /** @@ -167,7 +167,7 @@ class Options_Handler implements Options_Interface */ public function option_notoc(string $k, mixed $v): array { - return ['no_toc' => true]; + return ['noToc' => true]; } /** @@ -190,8 +190,8 @@ class Options_Handler implements Options_Interface trigger_error(sprintf("'%s' is not a readable docbook file", $v), E_USER_ERROR); } return [ - 'xml_root' => dirname($v), - 'xml_file' => $v, + 'xmlRoot' => dirname($v), + 'xmlFile' => $v, ]; } @@ -225,7 +225,7 @@ class Options_Handler implements Options_Interface } $v = (substr($v, strlen($v) - strlen(DIRECTORY_SEPARATOR)) === DIRECTORY_SEPARATOR) ? $v : ($v . DIRECTORY_SEPARATOR); - return ['output_dir' => $v]; + return ['outputDir' => $v]; } /** @@ -238,7 +238,7 @@ class Options_Handler implements Options_Interface } $file = basename($v); - return ['output_filename' => $file]; + return ['outputFilename' => $file]; } /** @@ -257,7 +257,7 @@ class Options_Handler implements Options_Interface */ public function option_partial(string $k, mixed $v): array { - $render_ids = $this->config->render_ids; + $renderIds = $this->config->renderIds; foreach((array)$v as $val) { $recursive = true; if (strpos($val, "=") !== false) { @@ -268,9 +268,9 @@ class Options_Handler implements Options_Interface } $recursive = (bool) $recursive; } - $render_ids[$val] = $recursive; + $renderIds[$val] = $recursive; } - return ['render_ids' => $render_ids]; + return ['renderIds' => $renderIds]; } /** @@ -319,7 +319,7 @@ class Options_Handler implements Options_Interface */ public function option_skip(string $k, mixed $v): array { - $skip_ids = $this->config->skip_ids; + $skipIds = $this->config->skipIds; foreach((array)$v as $val) { $recursive = true; if (strpos($val, "=") !== false) { @@ -330,9 +330,9 @@ class Options_Handler implements Options_Interface } $recursive = (bool) $recursive; } - $skip_ids[$val] = $recursive; + $skipIds[$val] = $recursive; } - return ['skip_ids' => $skip_ids]; + return ['skipIds' => $skipIds]; } /** @@ -350,7 +350,7 @@ class Options_Handler implements Options_Interface trigger_error("yes/no || on/off || true/false || 1/0 expected", E_USER_ERROR); } - return ['saveconfig' => $val]; + return ['saveConfig' => $val]; } /** @@ -444,7 +444,7 @@ class Options_Handler implements Options_Interface if (!is_bool($val)) { trigger_error("yes/no || on/off || true/false || 1/0 expected", E_USER_ERROR); } - return ['color_output' => $val]; + return ['colorOutput' => $val]; } /** @@ -474,7 +474,7 @@ class Options_Handler implements Options_Interface */ public function option_packagedir(string $k, mixed $v): array { - $packages = $this->config->package_dirs; + $packages = $this->config->packageDirs; foreach((array)$v as $val) { if ($path = realpath($val)) { if (!in_array($path, $packages)) { @@ -484,7 +484,7 @@ class Options_Handler implements Options_Interface trigger_error(vsprintf('Invalid path: %s', [$val]), E_USER_WARNING); } } - return ['package_dirs' => $packages]; + return ['packageDirs' => $packages]; } /** @@ -500,7 +500,7 @@ class Options_Handler implements Options_Interface */ public function option_xinclude(string $k, mixed $v): array { - return ['process_xincludes' => true]; + return ['processXincludes' => true]; } /** @@ -539,21 +539,21 @@ class Options_Handler implements Options_Interface --package The package to use -I --noindex Do not index before rendering but load from cache - (default: " . ($this->config->no_index ? 'true' : 'false') . ") + (default: " . ($this->config->noIndex ? 'true' : 'false') . ") -M --memoryindex Do not save indexing into a file, store it in memory. - (default: " . ($this->config->memoryindex ? 'true' : 'false') . ") + (default: " . ($this->config->memoryIndex ? 'true' : 'false') . ") -r --forceindex Force re-indexing under all circumstances - (default: " . ($this->config->force_index ? 'true' : 'false') . ") + (default: " . ($this->config->forceIndex ? 'true' : 'false') . ") -t --notoc Do not rewrite TOC before rendering but load from - cache (default: " . ($this->config->no_toc ? 'true' : 'false') . ") + cache (default: " . ($this->config->noToc ? 'true' : 'false') . ") -d --docbook The Docbook file to render from -x --xinclude Process XML Inclusions (XInclude) - (default: " . ($this->config->process_xincludes ? 'true' : 'false') . ") + (default: " . ($this->config->processXincludes ? 'true' : 'false') . ") -p --partial The ID to render, optionally skipping its children chunks (default to true; render children) @@ -563,7 +563,7 @@ class Options_Handler implements Options_Interface -l --list Print out the supported packages and formats -o - --output The output directory (default: " . $this->config->output_dir . ") + --output The output directory (default: " . $this->config->outputDir . ") -F filename --outputfilename filename Filename to use when writing standalone formats (default: -.) @@ -572,7 +572,7 @@ class Options_Handler implements Options_Interface theme). (default: " . $this->config->language . ") -c --color Enable color output when output is to a terminal - (default: " . ($this->config->getColor_output() ? 'true' : 'false') . ") + (default: " . ($this->config->getColorOutput() ? 'true' : 'false') . ") -C --css Link for an external CSS file. -g @@ -585,7 +585,7 @@ class Options_Handler implements Options_Interface --ext The alternative filename extension to use, including the dot. Use 'false' for no extension. -S - --saveconfig Save the generated config (default: " . ($this->config->saveconfig ? 'true' : 'false') . "). + --saveconfig Save the generated config (default: " . ($this->config->saveConfig ? 'true' : 'false') . "). -Q --quit Don't run the build. Use with --saveconfig to diff --git a/phpdotnet/phd/OutputHandler.php b/phpdotnet/phd/OutputHandler.php index a7bd0e5..96da4c3 100644 --- a/phpdotnet/phd/OutputHandler.php +++ b/phpdotnet/phd/OutputHandler.php @@ -31,34 +31,34 @@ class OutputHandler * Method to get a color escape sequence */ private function term_color(string $text, string|false $color): string { - return $this->config->getColor_output() && $color !== false ? "\033[" . $color . "m" . $text . "\033[m" : $text; + return $this->config->getColorOutput() && $color !== false ? "\033[" . $color . "m" . $text . "\033[m" : $text; } public function printPhdInfo(string $msg, string $info = ""): int { - $color = $this->config->phd_info_color; - $outputStream = $this->config->phd_info_output; + $color = $this->config->phdInfoColor; + $outputStream = $this->config->phdInfoOutput; return $this->print($msg, $outputStream, $color, $info); } private function printPhdWarning(string $msg, string $warning = ""): int { - $color = $this->config->phd_warning_color; - $outputStream = $this->config->phd_warning_output; + $color = $this->config->phdWarningColor; + $outputStream = $this->config->phdWarningOutput; return $this->print($msg, $outputStream, $color, $warning); } public function printUserError(string $msg, string $file, int $line, string $error = ""): int { - $color = $this->config->user_error_color; - $outputStream = $this->config->user_error_output; + $color = $this->config->userErrorColor; + $outputStream = $this->config->userErrorOutput; $data = \sprintf("%s:%d\n\t%s", $file, $line, $msg); return $this->print($data, $outputStream, $color, $error); } public function printPhpError(string $msg, string $file, int $line, string $error = ""): int { - $color = $this->config->php_error_color; - $outputStream = $this->config->php_error_output; + $color = $this->config->phpErrorColor; + $outputStream = $this->config->phpErrorOutput; $data = \sprintf("%s:%d\n\t%s", $file, $line, $msg); return $this->print($data, $outputStream, $color, $error); @@ -71,7 +71,7 @@ class OutputHandler return \fprintf($outputStream, "%s\n", $colorMsg); } - $time = \date($this->config->date_format); + $time = \date($this->config->dateFormat); $timestamp = $this->term_color(\sprintf("[%s - %s]", $time, $infoOrErrorString), $color); return \fprintf($outputStream, "%s %s\n", $timestamp, $msg); diff --git a/phpdotnet/phd/Package/Generic/BigXHTML.php b/phpdotnet/phd/Package/Generic/BigXHTML.php index a15076b..2dce3f9 100644 --- a/phpdotnet/phd/Package/Generic/BigXHTML.php +++ b/phpdotnet/phd/Package/Generic/BigXHTML.php @@ -79,9 +79,9 @@ HEADER; case Render::INIT: if ($value) { if (!is_resource($this->getFileStream())) { - $filename = $this->config->output_dir; - if ($this->config->output_filename) { - $filename .= $this->config->output_filename; + $filename = $this->config->outputDir; + if ($this->config->outputFilename) { + $filename .= $this->config->outputFilename; } else { $filename .= strtolower($this->getFormatName()) . $this->getExt(); } diff --git a/phpdotnet/phd/Package/Generic/ChunkedXHTML.php b/phpdotnet/phd/Package/Generic/ChunkedXHTML.php index 38ebf74..83e0481 100644 --- a/phpdotnet/phd/Package/Generic/ChunkedXHTML.php +++ b/phpdotnet/phd/Package/Generic/ChunkedXHTML.php @@ -73,7 +73,7 @@ class Package_Generic_ChunkedXHTML extends Package_Generic_XHTML { return; //Don't create output dir when rendering to buffer } - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); $this->postConstruct(); if (file_exists($this->getOutputDir())) { if (!is_dir($this->getOutputDir())) { diff --git a/phpdotnet/phd/Package/Generic/Manpage.php b/phpdotnet/phd/Package/Generic/Manpage.php index b258157..b86229a 100644 --- a/phpdotnet/phd/Package/Generic/Manpage.php +++ b/phpdotnet/phd/Package/Generic/Manpage.php @@ -312,7 +312,7 @@ class Package_Generic_Manpage extends Format_Abstract_Manpage { break; case Render::INIT: - $this->setOutputDir($this->config->output_dir . strtolower($this->toValidName($this->getFormatName())) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->toValidName($this->getFormatName())) . '/'); if (file_exists($this->getOutputDir())) { if (!is_dir($this->getOutputDir())) { trigger_error("Output directory is a file?", E_USER_ERROR); diff --git a/phpdotnet/phd/Package/Generic/PDF.php b/phpdotnet/phd/Package/Generic/PDF.php index 9088f4b..1254847 100644 --- a/phpdotnet/phd/Package/Generic/PDF.php +++ b/phpdotnet/phd/Package/Generic/PDF.php @@ -1132,7 +1132,7 @@ abstract class Package_Generic_PDF extends Format_Abstract_PDF { public function format_imagedata($open, $name, $attrs, $props) { if ($props["empty"] && isset($this->cchunk["xml-base"]) && ($base = $this->cchunk["xml-base"]) && isset($attrs[Reader::XMLNS_DOCBOOK]["fileref"]) && ($fileref = $attrs[Reader::XMLNS_DOCBOOK]["fileref"])) { - $imagePath = $this->config->xml_root . DIRECTORY_SEPARATOR . $base . $fileref; + $imagePath = $this->config->xmlRoot . DIRECTORY_SEPARATOR . $base . $fileref; if (file_exists($imagePath)) $this->pdfDoc->add(PdfWriter::IMAGE, $imagePath); diff --git a/phpdotnet/phd/Package/Generic/TocFeed.php b/phpdotnet/phd/Package/Generic/TocFeed.php index 5888fd1..43842db 100644 --- a/phpdotnet/phd/Package/Generic/TocFeed.php +++ b/phpdotnet/phd/Package/Generic/TocFeed.php @@ -218,7 +218,7 @@ abstract class Package_Generic_TocFeed extends Format case Render::INIT: $this->setOutputDir( - $this->config->output_dir + $this->config->outputDir . strtolower($this->getFormatName()) . '/' ); $dir = $this->getOutputDir(); diff --git a/phpdotnet/phd/Package/Generic/XHTML.php b/phpdotnet/phd/Package/Generic/XHTML.php index cfb78dc..5b783bf 100644 --- a/phpdotnet/phd/Package/Generic/XHTML.php +++ b/phpdotnet/phd/Package/Generic/XHTML.php @@ -665,7 +665,7 @@ abstract class Package_Generic_XHTML extends Format_Abstract_XHTML { } $stylesDir = $this->getOutputDir(); if (!$stylesDir) { - $stylesDir = $this->config->output_dir; + $stylesDir = $this->config->outputDir; } $stylesDir .= 'styles/'; if (file_exists($stylesDir)) { diff --git a/phpdotnet/phd/Package/IDE/Base.php b/phpdotnet/phd/Package/IDE/Base.php index adc089c..fadc967 100644 --- a/phpdotnet/phd/Package/IDE/Base.php +++ b/phpdotnet/phd/Package/IDE/Base.php @@ -207,15 +207,15 @@ abstract class Package_IDE_Base extends Format { } public function loadVersionInfo() { - if (file_exists($this->config->phpweb_version_filename)) { - $this->versions = self::generateVersionInfo($this->config->phpweb_version_filename); + if (file_exists($this->config->phpwebVersionFilename)) { + $this->versions = self::generateVersionInfo($this->config->phpwebVersionFilename); } else { trigger_error("Can't load the versions file", E_USER_ERROR); } } public function createOutputDirectory() { - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); if (file_exists($this->getOutputDir())) { if (!is_dir($this->getOutputDir())) { trigger_error("Output directory is a file?", E_USER_ERROR); diff --git a/phpdotnet/phd/Package/IDE/Funclist.php b/phpdotnet/phd/Package/IDE/Funclist.php index 9ec5b4f..2672fdb 100644 --- a/phpdotnet/phd/Package/IDE/Funclist.php +++ b/phpdotnet/phd/Package/IDE/Funclist.php @@ -42,7 +42,7 @@ class Package_IDE_Funclist extends Format { $this->registerTextMap($this->textmap); break; case Render::FINALIZE: - $filename = $this->config->output_dir . strtolower($this->getFormatName()) . $this->getExt(); + $filename = $this->config->outputDir . strtolower($this->getFormatName()) . $this->getExt(); file_put_contents($filename, $this->buffer); break; case Render::VERBOSE: diff --git a/phpdotnet/phd/Package/IDE/SQLite.php b/phpdotnet/phd/Package/IDE/SQLite.php index 6c8843c..22bcb7a 100644 --- a/phpdotnet/phd/Package/IDE/SQLite.php +++ b/phpdotnet/phd/Package/IDE/SQLite.php @@ -93,7 +93,7 @@ class Package_IDE_SQLite extends Package_IDE_Base { } public function createDatabase() { - $db = new \SQLite3($this->config->output_dir . strtolower($this->getFormatName()) . $this->getExt()); + $db = new \SQLite3($this->config->outputDir . strtolower($this->getFormatName()) . $this->getExt()); $db->exec('DROP TABLE IF EXISTS functions'); $db->exec('DROP TABLE IF EXISTS params'); $db->exec('DROP TABLE IF EXISTS notes'); diff --git a/phpdotnet/phd/Package/PEAR/BigXHTML.php b/phpdotnet/phd/Package/PEAR/BigXHTML.php index 300c206..98de5c2 100755 --- a/phpdotnet/phd/Package/PEAR/BigXHTML.php +++ b/phpdotnet/phd/Package/PEAR/BigXHTML.php @@ -45,9 +45,9 @@ HEADER; } public function createFileName() { - $filename = $this->config->output_dir; - if ($this->config->output_filename) { - $filename .= $this->config->output_filename; + $filename = $this->config->outputDir; + if ($this->config->outputFilename) { + $filename .= $this->config->outputFilename; } else { $filename .= strtolower($this->getFormatName()) . $this->getExt(); } diff --git a/phpdotnet/phd/Package/PEAR/CHM.php b/phpdotnet/phd/Package/PEAR/CHM.php index 9e30e49..f96dd38 100755 --- a/phpdotnet/phd/Package/PEAR/CHM.php +++ b/phpdotnet/phd/Package/PEAR/CHM.php @@ -221,11 +221,11 @@ class Package_PEAR_CHM extends Package_PEAR_ChunkedXHTML { parent::update($event, $value); break; case Render::INIT: - $this->chmdir = $this->config->output_dir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR; + $this->chmdir = $this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR; if(!file_exists($this->chmdir) || is_file($this->chmdir)) { mkdir($this->chmdir, 0777, true) or die("Can't create the CHM project directory"); } - $this->outputdir = $this->config->output_dir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR . "res" . DIRECTORY_SEPARATOR; + $this->outputdir = $this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR . "res" . DIRECTORY_SEPARATOR; $this->postConstruct(); if(!file_exists($this->outputdir) || is_file($this->outputdir)) { mkdir($this->outputdir, 0777, true) or die("Can't create the cache directory"); diff --git a/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php b/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php index a4c85d9..69f17af 100755 --- a/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php +++ b/phpdotnet/phd/Package/PEAR/ChunkedXHTML.php @@ -71,7 +71,7 @@ class Package_PEAR_ChunkedXHTML extends Package_PEAR_XHTML { break; case Render::INIT: - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); $this->postConstruct(); if (file_exists($this->getOutputDir())) { if (!is_dir($this->getOutputDir())) { diff --git a/phpdotnet/phd/Package/PHP/BigPDF.php b/phpdotnet/phd/Package/PHP/BigPDF.php index deeb209..ed56fc7 100644 --- a/phpdotnet/phd/Package/PHP/BigPDF.php +++ b/phpdotnet/phd/Package/PHP/BigPDF.php @@ -20,7 +20,7 @@ class Package_PHP_BigPDF extends Package_PHP_PDF { break; case Render::INIT: - $this->setOutputDir($this->config->output_dir); + $this->setOutputDir($this->config->outputDir); break; case Render::VERBOSE: @@ -56,8 +56,8 @@ class Package_PHP_BigPDF extends Package_PHP_PDF { $this->outputHandler->v("Writing Full PDF Manual (%s)", $this->cchunk["setname"], VERBOSE_TOC_WRITING); $filename = $this->getOutputDir(); - if ($this->config->output_filename) { - $filename .= $this->config->output_filename; + if ($this->config->outputFilename) { + $filename .= $this->config->outputFilename; } else { $filename .= strtolower($this->getFormatName()) . $this->getExt(); } diff --git a/phpdotnet/phd/Package/PHP/BigXHTML.php b/phpdotnet/phd/Package/PHP/BigXHTML.php index 4b3a7fd..f45ecf9 100644 --- a/phpdotnet/phd/Package/PHP/BigXHTML.php +++ b/phpdotnet/phd/Package/PHP/BigXHTML.php @@ -42,9 +42,9 @@ HEADER; } public function createFileName() { - $filename = $this->config->output_dir; - if ($this->config->output_filename) { - $filename .= $this->config->output_filename; + $filename = $this->config->outputDir; + if ($this->config->outputFilename) { + $filename .= $this->config->outputFilename; } else { $filename .= strtolower($this->getFormatName()) . $this->getExt(); } diff --git a/phpdotnet/phd/Package/PHP/CHM.php b/phpdotnet/phd/Package/PHP/CHM.php index eedeb66..f172f26 100644 --- a/phpdotnet/phd/Package/PHP/CHM.php +++ b/phpdotnet/phd/Package/PHP/CHM.php @@ -232,11 +232,11 @@ class Package_PHP_CHM extends Package_PHP_ChunkedXHTML case Render::INIT: $this->loadVersionAcronymInfo(); - $this->chmdir = $this->config->output_dir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR; + $this->chmdir = $this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR; if(!file_exists($this->chmdir) || is_file($this->chmdir)) { mkdir($this->chmdir, 0777, true) or die("Can't create the CHM project directory"); } - $this->outputdir = $this->config->output_dir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR . "res" . DIRECTORY_SEPARATOR; + $this->outputdir = $this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR . "res" . DIRECTORY_SEPARATOR; $this->postConstruct(); if(!file_exists($this->outputdir) || is_file($this->outputdir)) { mkdir($this->outputdir, 0777, true) or die("Can't create the cache directory"); diff --git a/phpdotnet/phd/Package/PHP/Epub.php b/phpdotnet/phd/Package/PHP/Epub.php index ad2e4dc..ef16501 100644 --- a/phpdotnet/phd/Package/PHP/Epub.php +++ b/phpdotnet/phd/Package/PHP/Epub.php @@ -35,7 +35,7 @@ class Package_PHP_Epub extends Package_PHP_ChunkedXHTML public function update($event, $value = null) { switch($event) { case Render::INIT: - $this->parentdir = $this->config->output_dir + $this->parentdir = $this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR; if(!file_exists($this->parentdir) || is_file($this->parentdir)) { diff --git a/phpdotnet/phd/Package/PHP/HowTo.php b/phpdotnet/phd/Package/PHP/HowTo.php index df3ec21..20db365 100644 --- a/phpdotnet/phd/Package/PHP/HowTo.php +++ b/phpdotnet/phd/Package/PHP/HowTo.php @@ -24,7 +24,7 @@ class Package_PHP_HowTo extends Package_PHP_Web { parent::update($event, $value); break; case Render::INIT: - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); $this->postConstruct(); if (file_exists($this->getOutputDir())) { if (!is_dir($this->getOutputDir())) { diff --git a/phpdotnet/phd/Package/PHP/KDevelop.php b/phpdotnet/phd/Package/PHP/KDevelop.php index 30437f7..5783e89 100644 --- a/phpdotnet/phd/Package/PHP/KDevelop.php +++ b/phpdotnet/phd/Package/PHP/KDevelop.php @@ -97,7 +97,7 @@ class Package_PHP_KDevelop extends Format { break; case Render::INIT: if ($value) { - $this->setOutputDir($this->config->output_dir); + $this->setOutputDir($this->config->outputDir); $this->setFileStream(fopen($this->getOutputDir() . strtolower($this->getFormatName()), "w")); self::headerToc(); } diff --git a/phpdotnet/phd/Package/PHP/PDF.php b/phpdotnet/phd/Package/PHP/PDF.php index 580ebcb..1576071 100644 --- a/phpdotnet/phd/Package/PHP/PDF.php +++ b/phpdotnet/phd/Package/PHP/PDF.php @@ -120,7 +120,7 @@ class Package_PHP_PDF extends Package_Generic_PDF { case Render::INIT: if (!class_exists("HaruDoc")) die ("PDF output needs libharu & haru/pecl extensions... Please install them and start PhD again.\n"); - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . DIRECTORY_SEPARATOR); if(!file_exists($this->getOutputDir()) || is_file($this->getOutputDir())) mkdir($this->getOutputDir(), 0777, true) or die("Can't create the cache directory.\n"); break; case Render::VERBOSE: diff --git a/phpdotnet/phd/Package/PHP/Web.php b/phpdotnet/phd/Package/PHP/Web.php index 67da25e..eed2b0a 100644 --- a/phpdotnet/phd/Package/PHP/Web.php +++ b/phpdotnet/phd/Package/PHP/Web.php @@ -82,7 +82,7 @@ class Package_PHP_Web extends Package_PHP_XHTML { case Render::INIT: $this->loadVersionAcronymInfo(); $this->loadSourcesInfo(); - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); $this->postConstruct(); $this->loadHistoryInfo(); if (file_exists($this->getOutputDir())) { @@ -95,7 +95,7 @@ class Package_PHP_Web extends Package_PHP_XHTML { } } if ($this->getFormatName() == "PHP-Web") { - if (!$this->config->no_toc && is_dir($this->getOutputDir() . 'toc')) { + if (!$this->config->noToc && is_dir($this->getOutputDir() . 'toc')) { $this->removeDir($this->getOutputDir() . 'toc'); } if (!file_exists($this->getOutputDir() . "toc") || is_file($this->getOutputDir() . "toc")) { @@ -301,7 +301,7 @@ contributors($setup); } public function loadSourcesInfo() { - $this->sources = self::generateSourcesInfo($this->config->phpweb_sources_filename); + $this->sources = self::generateSourcesInfo($this->config->phpwebSourcesFilename); } public static function generateSourcesInfo($filename) { @@ -346,12 +346,12 @@ contributors($setup); } public function loadHistoryInfo() { - if (!is_file($this->config->phpweb_history_filename)) { + if (!is_file($this->config->phpwebHistoryFilename)) { $this->history = []; return; } - $history = include $this->config->phpweb_history_filename; + $history = include $this->config->phpwebHistoryFilename; $this->history = (is_array($history)) ? $history : []; } diff --git a/phpdotnet/phd/Package/PHP/XHTML.php b/phpdotnet/phd/Package/PHP/XHTML.php index e8a1aa5..eef9c78 100644 --- a/phpdotnet/phd/Package/PHP/XHTML.php +++ b/phpdotnet/phd/Package/PHP/XHTML.php @@ -239,9 +239,9 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML { } public function loadVersionAcronymInfo() { - $this->versions = self::generateVersionInfo($this->config->phpweb_version_filename); - $this->deprecated = self::generateDeprecatedInfo($this->config->phpweb_version_filename); - $this->acronyms = self::generateAcronymInfo($this->config->phpweb_acronym_filename); + $this->versions = self::generateVersionInfo($this->config->phpwebVersionFilename); + $this->deprecated = self::generateDeprecatedInfo($this->config->phpwebVersionFilename); + $this->acronyms = self::generateAcronymInfo($this->config->phpwebAcronymFilename); } public static function generateVersionInfo($filename) { diff --git a/phpdotnet/phd/Reader/Partial.php b/phpdotnet/phd/Reader/Partial.php index 3a2d5a4..6ff1d63 100644 --- a/phpdotnet/phd/Reader/Partial.php +++ b/phpdotnet/phd/Reader/Partial.php @@ -9,18 +9,18 @@ class Reader_Partial extends Reader public function __construct( OutputHandler $outputHandler, - array $render_ids, - ?array $skip_ids = [], + array $renderIds, + ?array $skipIds = [], ?array $parents = [], ) { parent::__construct($outputHandler); - if ($render_ids === []) { + if ($renderIds === []) { throw new \Exception("Didn't get any IDs to seek"); } - $this->partial = $render_ids; - $this->skip = $skip_ids; + $this->partial = $renderIds; + $this->skip = $skipIds; $this->parents = $parents; } diff --git a/phpdotnet/phd/TestGenericChunkedXHTML.php b/phpdotnet/phd/TestGenericChunkedXHTML.php index d0c983e..b239dec 100644 --- a/phpdotnet/phd/TestGenericChunkedXHTML.php +++ b/phpdotnet/phd/TestGenericChunkedXHTML.php @@ -18,7 +18,7 @@ class TestGenericChunkedXHTML extends Package_Generic_ChunkedXHTML { parent::update($event, $value); break; case Render::INIT: - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); break; //No verbose } @@ -32,7 +32,7 @@ class TestGenericChunkedXHTML extends Package_Generic_ChunkedXHTML { $content .= stream_get_contents($fp); if ($id === "") { - $filename = $this->config->xml_file; + $filename = $this->config->xmlFile; } echo "Filename: " . basename($filename) . "\n"; diff --git a/phpdotnet/phd/TestPHPChunkedXHTML.php b/phpdotnet/phd/TestPHPChunkedXHTML.php index 145c217..ef15fbe 100644 --- a/phpdotnet/phd/TestPHPChunkedXHTML.php +++ b/phpdotnet/phd/TestPHPChunkedXHTML.php @@ -18,7 +18,7 @@ class TestPHPChunkedXHTML extends Package_PHP_ChunkedXHTML { parent::update($event, $value); break; case Render::INIT: - $this->setOutputDir($this->config->output_dir . strtolower($this->getFormatName()) . '/'); + $this->setOutputDir($this->config->outputDir . strtolower($this->getFormatName()) . '/'); break; //No verbose } @@ -32,7 +32,7 @@ class TestPHPChunkedXHTML extends Package_PHP_ChunkedXHTML { $content .= stream_get_contents($fp); if ($id === "") { - $filename = $this->config->xml_file; + $filename = $this->config->xmlFile; } echo "Filename: " . basename($filename) . "\n"; diff --git a/phpdotnet/phd/TestRender.php b/phpdotnet/phd/TestRender.php index 5e37db5..a0f82f2 100644 --- a/phpdotnet/phd/TestRender.php +++ b/phpdotnet/phd/TestRender.php @@ -11,11 +11,11 @@ class TestRender extends Render { public function run() { if ($this->index && $this->config->requiresIndexing()) { - if (!file_exists($this->config->output_dir)) { - mkdir($this->config->output_dir, 0755); + if (!file_exists($this->config->outputDir)) { + mkdir($this->config->outputDir, 0755); } $this->attach($this->index); - $this->reader->open($this->config->xml_file); + $this->reader->open($this->config->xmlFile); $this->execute($this->reader); $this->detach($this->index); } @@ -25,7 +25,7 @@ class TestRender extends Render { } if (count($this) > 0) { - $this->reader->open($this->config->xml_file); + $this->reader->open($this->config->xmlFile); $this->execute($this->reader); } } diff --git a/render.php b/render.php index 6071b04..5d62c0c 100644 --- a/render.php +++ b/render.php @@ -41,38 +41,38 @@ $commandLineOptions = $optionsParser->getopt(); $config->init($commandLineOptions); -if (isset($commandLineOptions["package_dirs"])) { - Autoloader::setPackageDirs($config->package_dirs); +if (isset($commandLineOptions["packageDirs"])) { + Autoloader::setPackageDirs($config->packageDirs); } /* If no docbook file was passed, die */ -if (!is_dir($config->xml_root) || !is_file($config->xml_file)) { +if (!is_dir($config->xmlRoot) || !is_file($config->xmlFile)) { trigger_error("No Docbook file given. Specify it on the command line with --docbook.", E_USER_ERROR); } -if (!file_exists($config->output_dir)) { +if (!file_exists($config->outputDir)) { $outputHandler->v("Creating output directory..", VERBOSE_MESSAGES); - if (!mkdir($config->output_dir, 0777, True)) { - trigger_error(vsprintf("Can't create output directory : %s", [$config->output_dir]), E_USER_ERROR); + if (!mkdir($config->outputDir, 0777, True)) { + trigger_error(vsprintf("Can't create output directory : %s", [$config->outputDir]), E_USER_ERROR); } $outputHandler->v("Output directory created", VERBOSE_MESSAGES); -} elseif (!is_dir($config->output_dir)) { +} elseif (!is_dir($config->outputDir)) { trigger_error("Output directory is not a file?", E_USER_ERROR); } // This needs to be moved. Preferably into the PHP package. if (!$conf) { $config->init(array( - "lang_dir" => __INSTALLDIR__ . DIRECTORY_SEPARATOR . "phpdotnet" . DIRECTORY_SEPARATOR + "langDir" => __INSTALLDIR__ . DIRECTORY_SEPARATOR . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "langs" . DIRECTORY_SEPARATOR, - "phpweb_version_filename" => $config->xml_root . DIRECTORY_SEPARATOR . 'version.xml', - "phpweb_acronym_filename" => $config->xml_root . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'acronyms.xml', - "phpweb_sources_filename" => $config->xml_root . DIRECTORY_SEPARATOR . 'sources.xml', - "phpweb_history_filename" => $config->xml_root . DIRECTORY_SEPARATOR . 'fileModHistory.php', + "phpwebVersionFilename" => $config->xmlRoot . DIRECTORY_SEPARATOR . 'version.xml', + "phpwebAcronymFilename" => $config->xmlRoot . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'acronyms.xml', + "phpwebSourcesFilename" => $config->xmlRoot . DIRECTORY_SEPARATOR . 'sources.xml', + "phpwebHistoryFilename" => $config->xmlRoot . DIRECTORY_SEPARATOR . 'fileModHistory.php', )); } -if ($config->saveconfig) { +if ($config->saveConfig) { $outputHandler->v("Writing the config file", VERBOSE_MESSAGES); file_put_contents("phd.config.php", "getAllFiltered(), 1) . ";"); } @@ -83,19 +83,19 @@ if ($config->quit) { function make_reader(Config $config, OutputHandler $outputHandler) { //Partial Rendering - $idlist = $config->render_ids + $config->skip_ids; + $idlist = $config->renderIds + $config->skipIds; if (!empty($idlist)) { $outputHandler->v("Running partial build", VERBOSE_RENDER_STYLE); $parents = []; - if ($config->indexcache) { - $parents = $config->indexcache->getParents($config->render_ids); + if ($config->indexCache) { + $parents = $config->indexCache->getParents($config->renderIds); } $reader = new Reader_Partial( $outputHandler, - $config->render_ids, - $config->skip_ids, + $config->renderIds, + $config->skipIds, $parents, ); } else { @@ -109,34 +109,34 @@ $render = new Render(); // Set reader LIBXML options $readerOpts = LIBXML_PARSEHUGE; -if ($config->process_xincludes) { +if ($config->processXincludes) { $readerOpts |= LIBXML_XINCLUDE; } // Setup indexing database -if ($config->memoryindex) { +if ($config->memoryIndex) { $db = new \SQLite3(":memory:"); $initializeDb = true; } else { - $initializeDb = !file_exists($config->output_dir . 'index.sqlite'); - $db = new \SQLite3($config->output_dir . 'index.sqlite'); + $initializeDb = !file_exists($config->outputDir . 'index.sqlite'); + $db = new \SQLite3($config->outputDir . 'index.sqlite'); } $indexRepository = new IndexRepository($db); if ($initializeDb) { $indexRepository->init(); } -$config->indexcache = $indexRepository; +$config->indexCache = $indexRepository; // Indexing if ($config->requiresIndexing()) { $outputHandler->v("Indexing...", VERBOSE_INDEXING); // Create indexer - $format = new Index($config->indexcache, $config, $outputHandler); + $format = new Index($config->indexCache, $config, $outputHandler); $render->attach($format); $reader = make_reader($config, $outputHandler); - $reader->open($config->xml_file, NULL, $readerOpts); + $reader->open($config->xmlFile, NULL, $readerOpts); $render->execute($reader); $render->detach($format); @@ -150,19 +150,19 @@ foreach($config->package as $package) { $factory = Format_Factory::createFactory($package); // Default to all output formats specified by the package - if (count($config->output_format) == 0) { - $config->output_format = $factory->getOutputFormats(); + if (count($config->outputFormat) == 0) { + $config->outputFormat = $factory->getOutputFormats(); } // Register the formats - foreach ($config->output_format as $format) { + foreach ($config->outputFormat as $format) { $render->attach($factory->createFormat($format, $config, $outputHandler)); } } // Render formats $reader = make_reader($config, $outputHandler); -$reader->open($config->xml_file, NULL, $readerOpts); +$reader->open($config->xmlFile, NULL, $readerOpts); foreach($render as $format) { $format->notify(Render::VERBOSE, true); } diff --git a/tests/bug_GH-87.phpt b/tests/bug_GH-87.phpt index 58cb0d9..01baf99 100644 --- a/tests/bug_GH-87.phpt +++ b/tests/bug_GH-87.phpt @@ -6,14 +6,14 @@ namespace phpdotnet\phd; require_once __DIR__ . "/setup.php"; -$xml_file = __DIR__ . "/data/bug_GH-87.xml"; +$xmlFile = __DIR__ . "/data/bug_GH-87.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); -$config->indexcache = $indexRepository; +$config->indexCache = $indexRepository; $index = new TestIndex($indexRepository, $config, $outputHandler); diff --git a/tests/bug_doc-en_GH-3353.phpt b/tests/bug_doc-en_GH-3353.phpt index 5445a7c..e2f0b0c 100644 --- a/tests/bug_doc-en_GH-3353.phpt +++ b/tests/bug_doc-en_GH-3353.phpt @@ -6,16 +6,16 @@ namespace phpdotnet\phd; require_once __DIR__ . "/setup.php"; -$xml_file = __DIR__ . "/data/bug_doc-en_GH-3353.xml"; +$xmlFile = __DIR__ . "/data/bug_doc-en_GH-3353.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $render = new Render(); $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); -$config->indexcache = $indexRepository; +$config->indexCache = $indexRepository; // Indexing @@ -23,7 +23,7 @@ $index = new TestIndex($indexRepository, $config, $outputHandler); $render->attach($index); $reader = new Reader($outputHandler); -$reader->open($config->xml_file, null, LIBXML_PARSEHUGE | LIBXML_XINCLUDE); +$reader->open($config->xmlFile, null, LIBXML_PARSEHUGE | LIBXML_XINCLUDE); $render->execute($reader); $render->detach($index); @@ -34,7 +34,7 @@ $format = new TestPHPChunkedXHTML($config, $outputHandler); $render->attach($format); $reader = new Reader($outputHandler); -$reader->open($config->xml_file, null, LIBXML_PARSEHUGE | LIBXML_XINCLUDE); +$reader->open($config->xmlFile, null, LIBXML_PARSEHUGE | LIBXML_XINCLUDE); $render->execute($reader); ?> diff --git a/tests/bug_doc-en_GH-3428.phpt b/tests/bug_doc-en_GH-3428.phpt index b579bfc..fe19e2c 100644 --- a/tests/bug_doc-en_GH-3428.phpt +++ b/tests/bug_doc-en_GH-3428.phpt @@ -6,14 +6,14 @@ namespace phpdotnet\phd; require_once __DIR__ . "/setup.php"; -$xml_file = __DIR__ . "/data/example_numbering_001.xml"; +$xmlFile = __DIR__ . "/data/example_numbering_001.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); -$config->indexcache = $indexRepository; +$config->indexCache = $indexRepository; $index = new TestIndex($indexRepository, $config, $outputHandler); diff --git a/tests/example_numbering_001.phpt b/tests/example_numbering_001.phpt index 7b47a93..6cab495 100644 --- a/tests/example_numbering_001.phpt +++ b/tests/example_numbering_001.phpt @@ -6,14 +6,14 @@ namespace phpdotnet\phd; require_once __DIR__ . "/setup.php"; -$xml_file = __DIR__ . "/data/example_numbering_001.xml"; +$xmlFile = __DIR__ . "/data/example_numbering_001.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); -$config->indexcache = $indexRepository; +$config->indexCache = $indexRepository; $index = new TestIndex($indexRepository, $config, $outputHandler); diff --git a/tests/index/bug_GH-98.phpt b/tests/index/bug_GH-98.phpt index cf2da92..c798509 100644 --- a/tests/index/bug_GH-98.phpt +++ b/tests/index/bug_GH-98.phpt @@ -6,10 +6,10 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../setup.php"; -$xml_file = __DIR__ . "/data/bug_GH-98.xml"; +$xmlFile = __DIR__ . "/data/bug_GH-98.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); diff --git a/tests/index/indexing_001.phpt b/tests/index/indexing_001.phpt index 7f36392..f1553f5 100644 --- a/tests/index/indexing_001.phpt +++ b/tests/index/indexing_001.phpt @@ -6,10 +6,10 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../setup.php"; -$xml_file = __DIR__ . "/data/indexing_001.xml"; +$xmlFile = __DIR__ . "/data/indexing_001.xml"; -$config->force_index = true; -$config->xml_file = $xml_file; +$config->forceIndex = true; +$config->xmlFile = $xmlFile; $indexRepository = new IndexRepository(new \SQLite3(":memory:")); $indexRepository->init(); diff --git a/tests/options/default_handler_009.phpt b/tests/options/default_handler_009.phpt index 948df0b..2730eeb 100644 --- a/tests/options/default_handler_009.phpt +++ b/tests/options/default_handler_009.phpt @@ -27,31 +27,31 @@ var_dump($commandLineOptions); ?> --EXPECTF-- array(20) { - ["output_format"]=> + ["outputFormat"]=> array(1) { [0]=> string(5) "xhtml" } - ["no_index"]=> + ["noIndex"]=> bool(true) - ["force_index"]=> + ["forceIndex"]=> bool(true) - ["no_toc"]=> + ["noToc"]=> bool(true) - ["xml_root"]=> + ["xmlRoot"]=> string(13) "tests/options" - ["xml_file"]=> + ["xmlFile"]=> string(38) "tests/options/default_handler_009.phpt" - ["output_dir"]=> + ["outputDir"]=> string(14) "tests/options/" - ["output_filename"]=> + ["outputFilename"]=> string(23) "default_handler_009.xml" - ["render_ids"]=> + ["renderIds"]=> array(1) { ["bookId"]=> bool(true) } - ["skip_ids"]=> + ["skipIds"]=> array(1) { ["idToSkip"]=> bool(true) @@ -60,7 +60,7 @@ array(20) { int(%d) ["language"]=> string(2) "en" - ["color_output"]=> + ["colorOutput"]=> bool(true) ["highlighter"]=> string(11) "highlighter" @@ -74,13 +74,13 @@ array(20) { [0]=> string(8) "some.css" } - ["process_xincludes"]=> + ["processXincludes"]=> bool(true) ["ext"]=> string(5) ".html" - ["memoryindex"]=> + ["memoryIndex"]=> bool(true) - ["package_dirs"]=> + ["packageDirs"]=> array(2) { [0]=> string(%d) "%s" diff --git a/tests/options/default_handler_010.phpt b/tests/options/default_handler_010.phpt index 24aab92..d24666b 100644 --- a/tests/options/default_handler_010.phpt +++ b/tests/options/default_handler_010.phpt @@ -27,31 +27,31 @@ var_dump($commandLineOptions); ?> --EXPECTF-- array(20) { - ["output_format"]=> + ["outputFormat"]=> array(1) { [0]=> string(5) "xhtml" } - ["no_index"]=> + ["noIndex"]=> bool(true) - ["force_index"]=> + ["forceIndex"]=> bool(true) - ["no_toc"]=> + ["noToc"]=> bool(true) - ["xml_root"]=> + ["xmlRoot"]=> string(13) "tests/options" - ["xml_file"]=> + ["xmlFile"]=> string(38) "tests/options/default_handler_009.phpt" - ["output_dir"]=> + ["outputDir"]=> string(14) "tests/options/" - ["output_filename"]=> + ["outputFilename"]=> string(23) "default_handler_009.xml" - ["render_ids"]=> + ["renderIds"]=> array(1) { ["bookId"]=> bool(true) } - ["skip_ids"]=> + ["skipIds"]=> array(1) { ["idToSkip"]=> bool(true) @@ -60,7 +60,7 @@ array(20) { int(%d) ["language"]=> string(2) "en" - ["color_output"]=> + ["colorOutput"]=> bool(true) ["highlighter"]=> string(11) "highlighter" @@ -74,13 +74,13 @@ array(20) { [0]=> string(8) "some.css" } - ["process_xincludes"]=> + ["processXincludes"]=> bool(true) ["ext"]=> string(5) ".html" - ["memoryindex"]=> + ["memoryIndex"]=> bool(true) - ["package_dirs"]=> + ["packageDirs"]=> array(2) { [0]=> string(%d) "%s" diff --git a/tests/package/generic/001.phpt b/tests/package/generic/001.phpt index 47935db..95460d0 100644 --- a/tests/package/generic/001.phpt +++ b/tests/package/generic/001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/001-1.xml"; +$xmlFile = __DIR__ . "/data/001-1.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/generic/002.phpt b/tests/package/generic/002.phpt index 1b7b379..34ba495 100644 --- a/tests/package/generic/002.phpt +++ b/tests/package/generic/002.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/002.xml"; +$xmlFile = __DIR__ . "/data/002.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/generic/003.phpt b/tests/package/generic/003.phpt index 2af5300..3143628 100644 --- a/tests/package/generic/003.phpt +++ b/tests/package/generic/003.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/003.xml"; +$xmlFile = __DIR__ . "/data/003.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/generic/attribute_formatting_001.phpt b/tests/package/generic/attribute_formatting_001.phpt index ce999a0..76bbf78 100644 --- a/tests/package/generic/attribute_formatting_001.phpt +++ b/tests/package/generic/attribute_formatting_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/attribute_formatting_001.xml"; +$xmlFile = __DIR__ . "/data/attribute_formatting_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); diff --git a/tests/package/generic/attribute_formatting_002.phpt b/tests/package/generic/attribute_formatting_002.phpt index 83a28a0..6e7aec9 100644 --- a/tests/package/generic/attribute_formatting_002.phpt +++ b/tests/package/generic/attribute_formatting_002.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/attribute_formatting_002.xml"; +$xmlFile = __DIR__ . "/data/attribute_formatting_002.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); diff --git a/tests/package/generic/attribute_formatting_003.phpt b/tests/package/generic/attribute_formatting_003.phpt index e54a6f3..ded7e66 100644 --- a/tests/package/generic/attribute_formatting_003.phpt +++ b/tests/package/generic/attribute_formatting_003.phpt @@ -6,11 +6,11 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/attribute_formatting_003.xml"; +$xmlFile = __DIR__ . "/data/attribute_formatting_003.xml"; $config = new Config; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); diff --git a/tests/package/generic/caption_001.phpt b/tests/package/generic/caption_001.phpt index f127432..e982f3c 100644 --- a/tests/package/generic/caption_001.phpt +++ b/tests/package/generic/caption_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/caption_001.xml"; +$xmlFile = __DIR__ . "/data/caption_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $format->postConstruct(); diff --git a/tests/package/generic/simplelist_001.phpt b/tests/package/generic/simplelist_001.phpt index 612f897..f75ab7f 100644 --- a/tests/package/generic/simplelist_001.phpt +++ b/tests/package/generic/simplelist_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/simplelist.xml"; +$xmlFile = __DIR__ . "/data/simplelist.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/generic/whitespace_formatting_001.phpt b/tests/package/generic/whitespace_formatting_001.phpt index bc6b725..b864270 100644 --- a/tests/package/generic/whitespace_formatting_001.phpt +++ b/tests/package/generic/whitespace_formatting_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/whitespace_formatting_001.xml"; +$xmlFile = __DIR__ . "/data/whitespace_formatting_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestGenericChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/bug49101-1.phpt b/tests/package/php/bug49101-1.phpt index acd3b0c..ac30b8e 100644 --- a/tests/package/php/bug49101-1.phpt +++ b/tests/package/php/bug49101-1.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/bug49101-1.xml"; +$xmlFile = __DIR__ . "/data/bug49101-1.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/bug49101-2.phpt b/tests/package/php/bug49101-2.phpt index 5640815..07661c6 100644 --- a/tests/package/php/bug49101-2.phpt +++ b/tests/package/php/bug49101-2.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/bug49101-1.xml"; +$xmlFile = __DIR__ . "/data/bug49101-1.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPBigXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/bug49102-1.phpt b/tests/package/php/bug49102-1.phpt index 545eee7..316809c 100644 --- a/tests/package/php/bug49102-1.phpt +++ b/tests/package/php/bug49102-1.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/bug49102-1.xml"; +$xmlFile = __DIR__ . "/data/bug49102-1.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/bug_doc-en_GH-3179.phpt b/tests/package/php/bug_doc-en_GH-3179.phpt index e5bb980..64a50d8 100644 --- a/tests/package/php/bug_doc-en_GH-3179.phpt +++ b/tests/package/php/bug_doc-en_GH-3179.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/bug_doc-en_GH-3197.xml"; +$xmlFile = __DIR__ . "/data/bug_doc-en_GH-3197.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/class_rendering_001.phpt b/tests/package/php/class_rendering_001.phpt index 44bb635..0448efc 100644 --- a/tests/package/php/class_rendering_001.phpt +++ b/tests/package/php/class_rendering_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/class_rendering_001.xml"; +$xmlFile = __DIR__ . "/data/class_rendering_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/class_rendering_002.phpt b/tests/package/php/class_rendering_002.phpt index 4add8f5..302dbe6 100644 --- a/tests/package/php/class_rendering_002.phpt +++ b/tests/package/php/class_rendering_002.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/class_rendering_002.xml"; +$xmlFile = __DIR__ . "/data/class_rendering_002.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/class_rendering_003.phpt b/tests/package/php/class_rendering_003.phpt index 005ff00..78d5120 100644 --- a/tests/package/php/class_rendering_003.phpt +++ b/tests/package/php/class_rendering_003.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_filePhpdoc = __DIR__ . "/data/class_rendering_001.xml"; +$xmlFilePhpdoc = __DIR__ . "/data/class_rendering_001.xml"; -$config->xml_file = $xml_filePhpdoc; +$config->xmlFile = $xmlFilePhpdoc; $formatPhpdoc = new TestPHPChunkedXHTML($config, $outputHandler); $renderPhpdoc = new TestRender(new Reader($outputHandler), $config, $formatPhpdoc); @@ -18,9 +18,9 @@ $renderPhpdoc->run(); $phpdocOutput = ob_get_clean(); -$xml_fileReferenceWithRole = __DIR__ . "/data/class_rendering_002.xml"; +$xmlFileReferenceWithRole = __DIR__ . "/data/class_rendering_002.xml"; -$config->xml_file = $xml_fileReferenceWithRole; +$config->xmlFile = $xmlFileReferenceWithRole; $formatReferenceWithRole = new TestPHPChunkedXHTML($config, $outputHandler); $renderReferenceWithRole = new TestRender(new Reader($outputHandler), $config, $formatReferenceWithRole); diff --git a/tests/package/php/constant_links_001.phpt b/tests/package/php/constant_links_001.phpt index 01bffc6..07f23b8 100644 --- a/tests/package/php/constant_links_001.phpt +++ b/tests/package/php/constant_links_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/constant_links.xml"; +$xmlFile = __DIR__ . "/data/constant_links.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $indices = [ [ diff --git a/tests/package/php/exception_rendering_001.phpt b/tests/package/php/exception_rendering_001.phpt index 780180a..9b6b440 100644 --- a/tests/package/php/exception_rendering_001.phpt +++ b/tests/package/php/exception_rendering_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/exception_rendering_001.xml"; +$xmlFile = __DIR__ . "/data/exception_rendering_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/exception_rendering_002.phpt b/tests/package/php/exception_rendering_002.phpt index 9a5ba51..327feb5 100644 --- a/tests/package/php/exception_rendering_002.phpt +++ b/tests/package/php/exception_rendering_002.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/exception_rendering_002.xml"; +$xmlFile = __DIR__ . "/data/exception_rendering_002.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/exception_rendering_003.phpt b/tests/package/php/exception_rendering_003.phpt index 252b065..06d349f 100644 --- a/tests/package/php/exception_rendering_003.phpt +++ b/tests/package/php/exception_rendering_003.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_filePhpdoc = __DIR__ . "/data/exception_rendering_001.xml"; +$xmlFilePhpdoc = __DIR__ . "/data/exception_rendering_001.xml"; -$config->xml_file = $xml_filePhpdoc; +$config->xmlFile = $xmlFilePhpdoc; $formatPhpdoc = new TestPHPChunkedXHTML($config, $outputHandler); $renderPhpdoc = new TestRender(new Reader($outputHandler), $config, $formatPhpdoc); @@ -18,9 +18,9 @@ $renderPhpdoc->run(); $phpdocOutput = ob_get_clean(); -$xml_fileReferenceWithRole = __DIR__ . "/data/exception_rendering_002.xml"; +$xmlFileReferenceWithRole = __DIR__ . "/data/exception_rendering_002.xml"; -$config->xml_file = $xml_fileReferenceWithRole; +$config->xmlFile = $xmlFileReferenceWithRole; $formatReferenceWithRole = new TestPHPChunkedXHTML($config, $outputHandler); $renderReferenceWithRole = new TestRender(new Reader($outputHandler), $config, $formatReferenceWithRole); diff --git a/tests/package/php/faq001.phpt b/tests/package/php/faq001.phpt index d883cfe..023840a 100644 --- a/tests/package/php/faq001.phpt +++ b/tests/package/php/faq001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/faq001.xml"; +$xmlFile = __DIR__ . "/data/faq001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/type_rendering_001.phpt b/tests/package/php/type_rendering_001.phpt index 7300eb9..6065765 100644 --- a/tests/package/php/type_rendering_001.phpt +++ b/tests/package/php/type_rendering_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/type_rendering_methodsynopsis_return_types.xml"; +$xmlFile = __DIR__ . "/data/type_rendering_methodsynopsis_return_types.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/type_rendering_002.phpt b/tests/package/php/type_rendering_002.phpt index 17fbd29..2e99387 100644 --- a/tests/package/php/type_rendering_002.phpt +++ b/tests/package/php/type_rendering_002.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/type_rendering_methodsynopsis_parameters.xml"; +$xmlFile = __DIR__ . "/data/type_rendering_methodsynopsis_parameters.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/type_rendering_003.phpt b/tests/package/php/type_rendering_003.phpt index f9da13d..18aa17d 100644 --- a/tests/package/php/type_rendering_003.phpt +++ b/tests/package/php/type_rendering_003.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml"; +$xmlFile = __DIR__ . "/data/type_rendering_constructorsynopsis_parameters-and-return-type.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/package/php/variablelist_rendering_001.phpt b/tests/package/php/variablelist_rendering_001.phpt index 5cce9e8..4f4d45d 100644 --- a/tests/package/php/variablelist_rendering_001.phpt +++ b/tests/package/php/variablelist_rendering_001.phpt @@ -6,9 +6,9 @@ namespace phpdotnet\phd; require_once __DIR__ . "/../../setup.php"; -$xml_file = __DIR__ . "/data/variablelist_rendering_001.xml"; +$xmlFile = __DIR__ . "/data/variablelist_rendering_001.xml"; -$config->xml_file = $xml_file; +$config->xmlFile = $xmlFile; $format = new TestPHPChunkedXHTML($config, $outputHandler); $render = new TestRender(new Reader($outputHandler), $config, $format); diff --git a/tests/setup.php b/tests/setup.php index 4c7e5db..37ebb2d 100644 --- a/tests/setup.php +++ b/tests/setup.php @@ -17,7 +17,7 @@ error_reporting($olderrrep | VERBOSE_DEFAULT); set_error_handler($errorHandler->handleError(...)); $config->init([]); -$config->lang_dir = __INSTALLDIR__ . DIRECTORY_SEPARATOR +$config->langDir = __INSTALLDIR__ . DIRECTORY_SEPARATOR . "phpdotnet" . DIRECTORY_SEPARATOR . "phd" . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "langs" . DIRECTORY_SEPARATOR; -$config->package_dirs = [__INSTALLDIR__]; +$config->packageDirs = [__INSTALLDIR__];