Controller_Migrator_MySQL::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        if (is_null($this->db)) {
            $this->db = $this->app->db;
        }
        if (!$this->db) {
            $this->db = $this->app->dbConnect();
        }
        if ($this->db->type != 'mysql') {
            throw $this->exception('Migrator can only be used with MySQL database')->addMoreInfo('type', $this->db->type);
        }
    }