\Beatnik_Driver_ldap2dns

Copyright 2005-2007 Alkaloid Networks <http://www.alkaloid.net>

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Summary

Methods
Properties
Constants
Beatnik_Driver()
getRecDriverTypes()
getRecDriverFields()
getDomains()
getDomain()
getRecord()
recordExists()
saveRecord()
deleteRecord()
factory()
Beatnik_Driver_ldap2dns()
_getDomains()
_getAttrByField()
getRecords()
_deleteRecord()
_saveRecord()
cleanFilterString()
cleanDNString()
_connect()
$_params
$_LDAP
$_connected
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Hash containing connection parameters.

Type

array

$_LDAP

$_LDAP : object

Handle for the current database connection.

Type

object — LDAP $_LDAP

$_connected

$_connected : boolean

Boolean indicating whether or not we're connected to the LDAP server.

Type

boolean

Methods

Beatnik_Driver()

Beatnik_Driver(  $params = array()) 

Parameters

$params

getRecDriverTypes()

getRecDriverTypes() : array

Get any record types available specifically in this driver.

Returns

array —

Records available only to this driver

getRecDriverFields()

getRecDriverFields(string  $type) : array

Get any fields available specifically in this driver by record type.

Parameters

string $type

Record type for which fields should be returned

Returns

array —

Fields specific to this driver

getDomains()

getDomains(integer  $perms = \Horde_Perms::SHOW) : array

Gets domains from driver for which the user has the specified permission.

Parameters

integer $perms

Permissions filter for domain result set

Returns

array —

Possibly empty array of domain information

getDomain()

getDomain(  $domainname) : mixed

Return SOA for a single domain

Parameters

$domainname

Returns

mixed —

Array of SOA information for domain

getRecord()

getRecord(  $id) : array

Gets a specific record from the backend. This method may be overridden in specific backend drivers if there is a performance or other benefit for doing so.

Parameters

$id

Returns

array —

Array of type and record information

recordExists()

recordExists(array  $record,   $rectype) : boolean

Try to determinate if the autogenerated record already exits. This method may be overridden in the backend driver for performance or other reasons.

Parameters

array $record

record to check

$rectype

Returns

boolean —

if records exits or or not

saveRecord()

saveRecord(array  $info) : mixed

Saves a record fo the configured driver and checks/sets needCommit() Also first checks to ensure permission to save record is available.

Parameters

array $info

Data to be passed to backend driver for storage

Returns

mixed —

True on success, PEAR::Error on error

deleteRecord()

deleteRecord(array  $info) : boolean

Delete record from backend

Parameters

array $info

Reference to array of record information for deletion

Returns

boolean —

true on success

factory()

factory(string  $driver = null, array  $params = null) : mixed

Attempts to return a concrete Beatnik_Driver instance based on $driver.

Parameters

string $driver

The type of the concrete Beatnik_Driver subclass to return. The class name is based on the storage driver ($driver). The code is dynamically included.

array $params

(optional) A hash containing any additional configuration or connection parameters a subclass might need.

Returns

mixed —

The newly created concrete Beatnik_Driver instance, or false on an error.

Beatnik_Driver_ldap2dns()

Beatnik_Driver_ldap2dns(array  $params = array()) 

Constructs a new Beatnik LDAP driver object.

Parameters

array $params

A hash containing connection parameters.

_getDomains()

_getDomains() : array

Gets all zones for accessible to the user matching the filter

Returns

array —

Array with zone records numerically indexed

_getAttrByField()

_getAttrByField(  $field) : string

Map LDAP Attributes to application record fields

Parameters

$field

string LDAP Attribute for which a record field should be returned

Returns

string —

Application record field name

getRecords()

getRecords(string  $domain) : array

Gets all records associated with the given zone

Parameters

string $domain

Retrieve records for this domain

Returns

array —

Array with zone records

_deleteRecord()

_deleteRecord(array  $info) : boolean

Delete record from backend

Parameters

array $info

Reference to array of record information for deletion

Returns

boolean —

true on success

_saveRecord()

_saveRecord(array  $info) : mixed

Saves a new or edited record to the DNS backend

Parameters

array $info

Array from Horde_Form with record data

Returns

mixed —

The new or modified record ID on success;

cleanFilterString()

cleanFilterString(  $string) 

Parameters

$string

cleanDNString()

cleanDNString(  $string) 

Parameters

$string

_connect()

_connect() : boolean

Attempts to open a connection to the LDAP server.

Throws

\Beatnik_Exception

Returns

boolean —

True on success.