<?php

namespace AuthStack\Installer\Model;

use Buckhill\Support\Traits\DotNotationAccessorTrait;

class MySQL
{
    use DotNotationAccessorTrait;

    protected $model;

    public function __construct(array $model)
    {
        $this->model = $model;
    }

    /**
     * @return array
     */
    public function toArray()
    {
        return [
            'id'        => 1,
            'host'      => $this->dotNotationFromModel('host'),
            'port'      => $this->dotNotationFromModel('port'),
            'dbname'    => $this->dotNotationFromModel('dbname'),
            'username'  => $this->dotNotationFromModel('username'),
            'password'  => $this->dotNotationFromModel('password'),
            'version'   => $this->dotNotationFromModel('version')
        ];
    }
}