1
0
Fork 0

Add lib-ICU platform package

pull/1625/head
Jordi Boggiano 2013-02-27 13:11:35 +01:00
parent 5b1f3145c2
commit f69418427f
1 changed files with 18 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class PlatformRepository extends ArrayRepository
// Doing it this way to know that functions or constants exist before
// relying on them.
foreach ($loadedExtensions as $name) {
$prettyVersion = null;
switch ($name) {
case 'curl':
$curlVersion = curl_version();
@ -80,6 +81,23 @@ class PlatformRepository extends ArrayRepository
$prettyVersion = ICONV_VERSION;
break;
case 'intl':
$name = 'ICU';
if (defined('INTL_ICU_VERSION')) {
$prettyVersion = INTL_ICU_VERSION;
} else {
$reflector = new \ReflectionExtension('intl');
ob_start();
$reflector->info();
$output = ob_get_clean();
preg_match('/^ICU version => (.*)$/m', $output, $matches);
$prettyVersion = $matches[1];
}
break;
case 'libxml':
$prettyVersion = LIBXML_DOTTED_VERSION;
break;