| 164 | | public static function checkDependencies(Phergie_Driver_Abstract $client, array$plugins) |
|---|
| 165 | | { |
|---|
| 166 | | if (self::staticPluginLoaded('ServerInfo', $client, $plugins)) { |
|---|
| 167 | | return false; |
|---|
| 168 | | } |
|---|
| 169 | | |
|---|
| 170 | | if (!extension_loaded('PDO') || !extension_loaded('pdo_sqlite')) { |
|---|
| 171 | | return false; |
|---|
| 172 | | } |
|---|
| 173 | | |
|---|
| 174 | | return true; |
|---|
| | 164 | public static function checkDependencies(Phergie_Driver_Abstract $client, array $plugins) |
|---|
| | 165 | { |
|---|
| | 166 | $errors = array(); |
|---|
| | 167 | |
|---|
| | 168 | if (!self::staticPluginLoaded('ServerInfo', $client, $plugins)) { |
|---|
| | 169 | $errors[] = 'ServerInfo plugin must be enabled'; |
|---|
| | 170 | } |
|---|
| | 171 | if (!extension_loaded('PDO')) { |
|---|
| | 172 | $errors[] = 'PDO php extension is required'; |
|---|
| | 173 | } |
|---|
| | 174 | if (!extension_loaded('pdo_sqlite')) { |
|---|
| | 175 | $errors[] = 'pdo_sqlite php extension is required'; |
|---|
| | 176 | } |
|---|
| | 177 | |
|---|
| | 178 | return empty($errors) ? true : $errors; |
|---|