src/OptionDbTrait.php
public function setDatabaseUrl ($url)
    {
        $parts = parse_url($url);

        $this->database['name'] = trim($parts['path'], '/');
        $this->database['user'] = $parts['user'];
        $this->database['pass'] = $parts['pass'];
        $this->database['host'] = $parts['host'];
        $this->database['port'] = $parts['port'];

        return $this;
    }
public function setDatabaseUrl ($url)
    {
        $parts = parse_url($url);

        $this->database['name'] = trim($parts['path'], '/');
        $this->database['user'] = $parts['user'];
        $this->database['pass'] = $parts['pass'];
        $this->database['host'] = $parts['host'];
        $this->database['port'] = $parts['port'];

        return $this;
    }
public function setDatabaseUrl ( $ url ) { $ parts = parse_url ( $ url ) ; $ this -> database [ 'name' ] = trim ( $ parts [ 'path' ] , '/' ) ; $ this -> database [ 'user' ] = $ parts [ 'user' ] ; $ this -> database [ 'pass' ] = $ parts [ 'pass' ] ; $ this -> database [ 'host' ] = $ parts [ 'host' ] ; $ this -> database [ 'port' ] = $ parts [ 'port' ] ; return $ this ; }
Set the database details via URL

@return $this
Set the database details via URL