public function setDatabaseInfo($data)
    {
        $data['host'] = $data['host'].':'.$data['port'];

        unset($data['port']);

        $keys = array_map(function($key) {
            return 'database_'.$key;
        }, array_keys($data));

        $data = array_combine($keys, array_values($data));

        $this->set($data);
    }
public function setDatabaseInfo($data)
    {
        $data['host'] = $data['host'].':'.$data['port'];

        unset($data['port']);

        $keys = array_map(function($key) {
            return 'database_'.$key;
        }, array_keys($data));

        $data = array_combine($keys, array_values($data));

        $this->set($data);
    }
public function setDatabaseInfo ( $ data ) { $ data [ 'host' ] = $ data [ 'host' ] . ':' . $ data [ 'port' ] ; unset ( $ data [ 'port' ] ) ; $ keys = array_map ( function ( $ key ) { return 'database_' . $ key ; } , array_keys ( $ data ) ) ; $ data = array_combine ( $ keys , array_values ( $ data ) ) ; $ this -> set ( $ data ) ; }
Set configuration database info

@param array $data

@return void
Set configuration database info