phpLDAPadmin

# Class: DS

Source Location: /templates/3rdParty/pla/lib/ds.php

### Class Overview

This abstract class provides the basic variables and methods.

#### Author(s):

### Variables

- $custom
- $default
- $index
- $type

### Methods

- __construct
- connect
- getAuthType
- getErrorMessage
- getErrorNum
- getIndex
- getLogin
- getMethod
- getName
- getPassword
- getValue
- inactivityTime
- isDefaultKey
- isDefaultSetting
- isLoggedIn
- isReadOnly
- isSessionValid
- isVisible
- login
- logout
- query
- setDefaults
- setLogin
- setValue
- untested

### Child classes:

myldap
  This abstract class provides the basic variables and methods for LDAP datastores

### Class Details

[line 15]
This abstract class provides the basic variables and methods.

#### Tags:

abstract: |

[ Top ]

### Class Variables

#### $custom =

[line 21]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $default =

[line 20]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $index =

[line 17]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $type =

[line 22]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 24]

`DS __construct( $index)`

#### Tags:

abstract: |

Overridden in child classes as:

myldap::__construct()

ldap_pla::__construct()

#### Parameters:

| $index |

[ Top ]

### method connect [line 29]

`void connect( $method, [ $debug = false])`

This will make the connection to the datasource

#### Tags:

abstract: |
access: | protected

Overridden in child classes as:

myldap::connect()
  Connect and Bind to the Database

#### Parameters:

| $method |
| $debug |

[ Top ]

### method getAuthType [line 131]

`void getAuthType( )`

Return the authentication type for this object

#### Tags:

access: | public

[ Top ]

### method getErrorMessage [line 47]

`void getErrorMessage( )`

Return error details from previous operation

#### Tags:

abstract: |
access: | protected

Overridden in child classes as:

myldap::getErrorMessage()
  Get the last error string

[ Top ]

### method getErrorNum [line 48]

`void getErrorNum( )`

#### Tags:

abstract: |
access: | protected

Overridden in child classes as:

myldap::getErrorNum()
  Get the last error number

[ Top ]

### method getIndex [line 439]

`void getIndex( )`

#### Tags:

access: | public

[ Top ]

### method getLogin [line 155]

`void getLogin( [ $method = null])`

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

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

#### Tags:

access: | public

#### Parameters:

| $method |

[ Top ]

### method getMethod [line 455]

`string getMethod( [int $method = null])`

Work out which connection method to use.

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.

#### Tags:

return: | Connection Method
access: | protected

#### Parameters:

int | $method | Server ID

[ Top ]

### method getName [line 118]

`void getName( )`

Get the name of this datastore

#### Tags:

access: | public

[ Top ]

### method getPassword [line 240]

`void getPassword( [ $method = null])`

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

#### Tags:

access: | protected

#### Parameters:

| $method |

[ Top ]

### method getValue [line 70]

`void getValue( $key, $setting, [ $fatal = true])`

Return a configuration value

#### Tags:

access: | public

#### Parameters:

| $key |
| $setting |
| $fatal |

[ Top ]

### method inactivityTime [line 491]

`void inactivityTime( )`

Return the time left in seconds until this connection times out. If there is not timeout, this function will return null.

#### Tags:

access: | public

[ Top ]

### method isDefaultKey [line 59]

`void isDefaultKey( $key)`

#### Tags:

access: | public

#### Parameters:

| $key |

[ Top ]

### method isDefaultSetting [line 63]

`void isDefaultSetting( $key, $setting)`

#### Tags:

access: | public

#### Parameters:

| $key |
| $setting |

[ Top ]

### method isLoggedIn [line 285]

`void isLoggedIn( [ $method = null])`

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

#### Tags:

access: | public

#### Parameters:

| $method |

[ Top ]

### method isReadOnly [line 429]

`void isReadOnly( )`

#### Tags:

access: | public

[ Top ]

### method isSessionValid [line 480]

`void isSessionValid( )`

This method should be overridden in application specific ds files

#### Tags:

access: | public

Overridden in child classes as:

ldap_pla::isSessionValid()
  Check if the session timeout has occured for this LDAP server.

[ Top ]

### method isVisible [line 422]

`void isVisible( )`

Functions that return the condition of the datasource

#### Tags:

access: | public

[ Top ]

### method login [line 37]

`void login( [ $user = null], [ $pass = null], [ $method = null])`

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

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

#### Tags:

abstract: |
access: | public

Overridden in child classes as:

myldap::login()
  Login to the database with the application user/password

#### Parameters:

| $user |
| $pass |
| $method |

[ Top ]

### method logout [line 389]

`void logout( [ $method = null])`

Logout of this datastore's connection method

#### Tags:

access: | public

#### Parameters:

| $method |

[ Top ]

### method query [line 42]

`void query( $query, $method, [ $index = null], [ $debug = false])`

Query the datasource

#### Tags:

abstract: |
access: | public

Overridden in child classes as:

myldap::query()
  Perform a query to the Database

#### Parameters:

| $query |
| $method |
| $index |
| $debug |

[ Top ]

### method setDefaults [line 53]

`void setDefaults( $defaults)`

Functions that set and verify object configuration details

#### Tags:

access: | public

#### Parameters:

| $defaults |

[ Top ]

### method setLogin [line 205]

`void setLogin( $user, $pass, [ $method = null])`

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

#### Tags:

access: | protected

#### Parameters:

| $user |
| $pass |
| $method |

[ Top ]

### method setValue [line 90]

`void setValue( $key, $setting, $value)`

Set a configuration value

#### Tags:

access: | public

#### Parameters:

| $key |
| $setting |
| $value |

[ Top ]

### method untested [line 104]

`void untested( )`

Return the untested config items

#### Tags:

access: | public

[ Top ]

Documentation generated on Tue, 22 Nov 2011 16:29:37 +0100 by phpDocumentor 1.4.1