mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-26 16:01:05 +00:00
20 lines
391 B
PHP
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;
|
|
}
|
|
}
|