Documentation

Beatnik_Driver_ldap2dns extends Beatnik_Driver
in package

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.

Tags
author

Ben Klang ben@alkaloid.net

Table of Contents

$_connected  : bool
Boolean indicating whether or not we're connected to the LDAP server.
$_LDAP  : object
Handle for the current database connection.
$_params  : array<string|int, mixed>
Hash containing connection parameters.
_connect()  : bool
Attempts to open a connection to the LDAP server.
_deleteRecord()  : bool
Delete record from backend
_getAttrByField()  : string
Map LDAP Attributes to application record fields
_getDomains()  : array<string|int, mixed>
Gets all zones for accessible to the user matching the filter
_saveRecord()  : mixed
Saves a new or edited record to the DNS backend
Beatnik_Driver()  : mixed
Beatnik_Driver_ldap2dns()  : mixed
Constructs a new Beatnik LDAP driver object.
cleanDNString()  : mixed
cleanFilterString()  : mixed
deleteRecord()  : bool
Delete record from backend
factory()  : mixed
Attempts to return a concrete Beatnik_Driver instance based on $driver.
getDomain()  : mixed
Return SOA for a single domain
getDomains()  : array<string|int, mixed>
Gets domains from driver for which the user has the specified permission.
getRecDriverFields()  : array<string|int, mixed>
Get any fields available specifically in this driver by record type.
getRecDriverTypes()  : array<string|int, mixed>
Get any record types available specifically in this driver.
getRecord()  : array<string|int, mixed>
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.
getRecords()  : array<string|int, mixed>
Gets all records associated with the given zone
recordExists()  : bool
Try to determinate if the autogenerated record already exits. This method may be overridden in the backend driver for performance or other reasons.
saveRecord()  : mixed
Saves a record fo the configured driver and checks/sets needCommit() Also first checks to ensure permission to save record is available.

Properties

$_connected

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

public bool $_connected = alse

$_LDAP

Handle for the current database connection.

public object $_LDAP

LDAP $_LDAP

$_params

Hash containing connection parameters.

public array<string|int, mixed> $_params = array()

Methods

_connect()

Attempts to open a connection to the LDAP server.

public _connect() : bool
Tags
access

private

access

private

throws
Beatnik_Exception
Return values
bool

True on success.

_deleteRecord()

Delete record from backend

public _deleteRecord(array<string|int, mixed> &$info) : bool
Parameters
$info : array<string|int, mixed>

Reference to array of record information for deletion

Tags
access

private

Return values
bool

true on success

_getAttrByField()

Map LDAP Attributes to application record fields

public _getAttrByField( $field) : string
Parameters
$field :

string LDAP Attribute for which a record field should be returned

Tags
access

private

Return values
string

Application record field name

_getDomains()

Gets all zones for accessible to the user matching the filter

public _getDomains() : array<string|int, mixed>
Tags
access

private

Return values
array<string|int, mixed>

Array with zone records numerically indexed

_saveRecord()

Saves a new or edited record to the DNS backend

public _saveRecord(array<string|int, mixed> $info) : mixed
Parameters
$info : array<string|int, mixed>

Array from Horde_Form with record data

Tags
access

private

Return values
mixed

The new or modified record ID on success;

Beatnik_Driver()

public Beatnik_Driver([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()
Return values
mixed

Beatnik_Driver_ldap2dns()

Constructs a new Beatnik LDAP driver object.

public Beatnik_Driver_ldap2dns([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

A hash containing connection parameters.

Return values
mixed

cleanDNString()

public cleanDNString(mixed $string) : mixed
Parameters
$string : mixed
Return values
mixed

cleanFilterString()

public cleanFilterString(mixed $string) : mixed
Parameters
$string : mixed
Return values
mixed

deleteRecord()

Delete record from backend

public deleteRecord(array<string|int, mixed> &$info) : bool
Parameters
$info : array<string|int, mixed>

Reference to array of record information for deletion

Tags
access

private

Return values
bool

true on success

factory()

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

public factory([string $driver = null ][, array<string|int, mixed> $params = null ]) : mixed
Parameters
$driver : string = null

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.

$params : array<string|int, mixed> = null

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

Return values
mixed

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

getDomain()

Return SOA for a single domain

public getDomain(mixed $domainname) : mixed
Parameters
$domainname : mixed
Return values
mixed

Array of SOA information for domain

getDomains()

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

public getDomains([int $perms = Horde_Perms::SHOW ]) : array<string|int, mixed>
Parameters
$perms : int = Horde_Perms::SHOW

Permissions filter for domain result set

Return values
array<string|int, mixed>

Possibly empty array of domain information

getRecDriverFields()

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

public getRecDriverFields(string $type) : array<string|int, mixed>
Parameters
$type : string

Record type for which fields should be returned

Return values
array<string|int, mixed>

Fields specific to this driver

getRecDriverTypes()

Get any record types available specifically in this driver.

public getRecDriverTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

Records available only to this driver

getRecord()

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.

public getRecord(mixed $id) : array<string|int, mixed>
Parameters
$id : mixed
Return values
array<string|int, mixed>

Array of type and record information

getRecords()

Gets all records associated with the given zone

public getRecords(string $domain) : array<string|int, mixed>
Parameters
$domain : string

Retrieve records for this domain

Return values
array<string|int, mixed>

Array with zone records

recordExists()

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

public recordExists(array<string|int, mixed> $record, mixed $rectype) : bool
Parameters
$record : array<string|int, mixed>

record to check

$rectype : mixed
Return values
bool

if records exits or or not

saveRecord()

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

public saveRecord(array<string|int, mixed> &$info) : mixed
Parameters
$info : array<string|int, mixed>

Data to be passed to backend driver for storage

Return values
mixed

True on success, PEAR::Error on error

Search results