BUGFIX Installer should check for DOMDocument (DOM/XML extension for PHP), as it's required to be there for sapphire to operate correctly (from r103471)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112228 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2010-10-13 04:28:45 +00:00
parent bc60d451e5
commit 2c798ff57d

View File

@ -362,6 +362,7 @@ class InstallRequirements {
// Check for XML support
$this->requireFunction('xml_set_object', array("PHP Configuration", "XML support", "XML support not included in PHP."));
$this->requireClass('DOMDocument', array("PHP Configuration", "DOM/XML support", "DOM/XML support not included in PHP."));
// Check for token_get_all
$this->requireFunction('token_get_all', array("PHP Configuration", "PHP Tokenizer", "PHP tokenizer support not included in PHP."));
@ -492,7 +493,13 @@ class InstallRequirements {
if(!function_exists($funcName)) $this->error($testDetails);
else return true;
}
function requireClass($className, $testDetails) {
$this->testing($testDetails);
if(!class_exists($className)) $this->error($testDetails);
else return false;
}
/**
* Require that the given class doesn't exist
*/