Update template script to be smarter about missing extensions.
This commit is contained in:
parent
aaf3338e6f
commit
c74b98e131
1 changed files with 5 additions and 4 deletions
|
@ -103,11 +103,10 @@ $allowed_extensions = array(
|
||||||
$processed = array();
|
$processed = array();
|
||||||
|
|
||||||
foreach ($allowed_extensions as $extension) {
|
foreach ($allowed_extensions as $extension) {
|
||||||
$details = array();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$details = array();
|
||||||
$options = new ReflectionExtension($extension);
|
$options = new ReflectionExtension($extension);
|
||||||
$details['name'] = $options->getName();
|
|
||||||
|
|
||||||
$classes = array();
|
$classes = array();
|
||||||
$functions = array_keys($options->getFunctions());
|
$functions = array_keys($options->getFunctions());
|
||||||
|
@ -120,6 +119,8 @@ foreach ($allowed_extensions as $extension) {
|
||||||
|
|
||||||
$constants = array_unique($constants);
|
$constants = array_unique($constants);
|
||||||
|
|
||||||
|
$details['name'] = $options->getName();
|
||||||
|
|
||||||
if (sizeof ($functions)) {
|
if (sizeof ($functions)) {
|
||||||
$details['functions'] = implode(' ', $functions);
|
$details['functions'] = implode(' ', $functions);
|
||||||
}
|
}
|
||||||
|
@ -129,11 +130,11 @@ foreach ($allowed_extensions as $extension) {
|
||||||
if (sizeof ($classes)) {
|
if (sizeof ($classes)) {
|
||||||
$details['classes'] = implode(' ', $classes);
|
$details['classes'] = implode(' ', $classes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$processed[$extension] = $details;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
print "ERROR: '{$extension}' -- " . $e->getMessage() . "\n";
|
print "ERROR: '{$extension}' -- " . $e->getMessage() . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$processed[$extension] = $details;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$code = "syn case match\n\n";
|
$code = "syn case match\n\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue