- $label = '<comment>PCRE</comment>';
- if (extension_loaded('pcre')) {
- $status = '<info>OK!</info>';
- $help = '';
- } else {
- $fulfilled = false;
- $status = '<error>ERROR!</error>';
- $help = 'You should enabled PCRE extension';
- }
- $rows[] = array($label, $status, $help);
-
- $label = '<comment>DOM</comment>';
- if (extension_loaded('DOM')) {
- $status = '<info>OK!</info>';
- $help = '';
- } else {
- $fulfilled = false;
- $status = '<error>ERROR!</error>';
- $help = 'You should enabled DOM extension';
+ foreach ($this->requirements as $requirement) {
+ $label = '<comment>'.strtoupper($requirement).'</comment>';
+ if (extension_loaded($requirement)) {
+ $status = '<info>OK!</info>';
+ $help = '';
+ } else {
+ $fulfilled = false;
+ $status = '<error>ERROR!</error>';
+ $help = 'You should enabled '.$requirement.' extension';
+ }
+ $rows[] = array($label, $status, $help);