\Beatnik_Driver

Beatnik_Driver:: defines an API implementing astorage backends for Beatnik.

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()
$_params
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

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.