public function saveConfig($server = null)
    {
        if (is_array($server) && isset($server['name'])) {
            if (!isset($server['objectClass'])) {
                $server = $this->setDefaultServerUserObject($server);
            }
            $this->config['servers'][$server['name']] = $server;
        }

        return file_put_contents($this->path, $this->dumper->dump($this->config, 3));
    }
public function saveConfig($server = null)
    {
        if (is_array($server) && isset($server['name'])) {
            if (!isset($server['objectClass'])) {
                $server = $this->setDefaultServerUserObject($server);
            }
            $this->config['servers'][$server['name']] = $server;
        }

        return file_put_contents($this->path, $this->dumper->dump($this->config, 3));
    }
public function saveConfig ( $ server = null ) { if ( is_array ( $ server ) && isset ( $ server [ 'name' ] ) ) { if ( ! isset ( $ server [ 'objectClass' ] ) ) { $ server = $ this -> setDefaultServerUserObject ( $ server ) ; } $ this -> config [ 'servers' ] [ $ server [ 'name' ] ] = $ server ; } return file_put_contents ( $ this -> path , $ this -> dumper -> dump ( $ this -> config , 3 ) ) ; }
Save the LDAP configuration in a .yml file.

@param $server An array containing LDAP informations as host, port or dn

@return mixed
Save the LDAP configuration in a . yml file .