This abstract class provides the basic variables and methods.

package | phpLDAPadmin
subpackage | DataStore

### Methods

## __construct()

    __construct($index)

### Parameters

#### $index

## Return the authentication type for this object

    getAuthType()

## getIndex()

    getIndex()

## Get the login name of the user logged into this datastore's connection method If this returns null, we are not logged in.

    getLogin($method)

If this returns '', we are logged in with anonymous

### Parameters

#### $method

## Get the name of this datastore

    getName()

## Return a configuration value

    getValue($key, $setting, $fatal)

### Parameters

#### $key

#### $setting

#### $fatal

## Return the time left in seconds until this connection times out.

    inactivityTime()

If there is not timeout, this function will return null.

## isDefaultKey()

    isDefaultKey($key)

### Parameters

#### $key

## isDefaultSetting()

    isDefaultSetting($key, $setting)

### Parameters

#### $key

#### $setting

## Return if this datastore's connection method has been logged into

    isLoggedIn($method)

### Parameters

#### $method

## isReadOnly()

    isReadOnly()

## This method should be overridden in application specific ds files

    isSessionValid()

## Functions that return the condition of the datasource

    isVisible()

## Login to the datastore method: default = anon, connect to ds using bind_id not auth_id.

    login($user, $pass, $method)

method: 'user', connect with auth_id method: '<freetext>', any custom extra connection to ds.

### Parameters

#### $user

#### $pass

#### $method

## Logout of this datastore's connection method

    logout($method)

### Parameters

#### $method

## Query the datasource

    query($query, $method, $index, $debug)

### Parameters

#### $query

#### $method

#### $index

#### $debug

## Functions that set and verify object configuration details

    setDefaults($defaults)

### Parameters

#### $defaults

## Set a configuration value

    setValue($key, $setting, $value)

### Parameters

#### $key

#### $setting

#### $value

## Return the untested config items

    untested()

## This will make the connection to the datasource

    connect($method, $debug)

### Parameters

#### $method

#### $debug

## Return error details from previous operation

    getErrorMessage()

## getErrorNum()

    getErrorNum()

## Work out which connection method to use.

    getMethod(int $method) : string

If a method is passed, then it will be passed back. If no method is passed, then we'll check to see if the user is logged in. If they are, then 'user' is used, otherwise 'anon' is used.

### Parameters

#### $method

`int`

Server ID

### Returns

`string`Connection Method

## Get the login password of the user logged into this datastore's connection method

    getPassword($method)

### Parameters

#### $method

## Set the login details of the user logged into this datastore's connection method

    setLogin($user, $pass, $method)

### Parameters

#### $user

#### $pass

#### $method

### Properties

## $custom

    $custom

## $default

    $default

## $index

    $index

## $type

    $type