devilbox/.devilbox/www/htdocs/vendor/phpredmin/models/info.php
2018-08-12 10:51:32 +02:00

20 lines
391 B
PHP

<?php
class Info_Model extends Model
{
public function getDbs($info)
{
$result = array();
$keys = array_keys($info);
$dbs = preg_grep('/^db[0-9]+?$/', $keys);
foreach ($dbs as $db) {
if (preg_match('/^db([0-9]+)$/', $db, $matches)) {
$result[] = $matches[1];
}
}
return $result;
}
}