Returns the PHP configuration.
@since Method available since Release 3.2.1
array
public function getPHPConfiguration() {
$result = array(
'include_path' => array(),
'ini' => array(),
'const' => array(),
'var' => array(),
'env' => array(),
'post' => array(),
'get' => array(),
'cookie' => array(),
'server' => array(),
'files' => array(),
'request' => array(),
);
foreach ($this->xpath
->query('php/includePath') as $includePath) {
$path = (string) $includePath->nodeValue;
$result['include_path'][] = $this
->toAbsolutePath($path);
}
foreach ($this->xpath
->query('php/ini') as $ini) {
$name = (string) $ini
->getAttribute('name');
$value = (string) $ini
->getAttribute('value');
$result['ini'][$name] = $value;
}
foreach ($this->xpath
->query('php/const') as $const) {
$name = (string) $const
->getAttribute('name');
$value = (string) $const
->getAttribute('value');
$result['const'][$name] = $this
->getBoolean($value, $value);
}
foreach (array(
'var',
'env',
'post',
'get',
'cookie',
'server',
'files',
'request',
) as $array) {
foreach ($this->xpath
->query('php/' . $array) as $var) {
$name = (string) $var
->getAttribute('name');
$value = (string) $var
->getAttribute('value');
$result[$array][$name] = $this
->getBoolean($value, $value);
}
}
return $result;
}