Overview

Packages

  • Beatnik
  • None

Classes

  • Autogenerate
  • Beatnik
  • Beatnik_Driver
  • Beatnik_Driver_ldap2dns
  • Beatnik_Driver_pdnsgsql
  • Beatnik_Driver_sql
  • DeleteRecord
  • EditRecord
  • Overview
  • Package
  • Class
  • Tree

Class 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 COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Direct known subclasses

Beatnik_Driver_ldap2dns, Beatnik_Driver_pdnsgsql, Beatnik_Driver_sql
Package: Beatnik
Author: Ben Klang ben@alkaloid.net
Located at Driver.php
Methods summary
public
# Beatnik_Driver( mixed $params = array() )
public array
# getRecDriverTypes( )

Get any record types available specifically in this driver.

Get any record types available specifically in this driver.

Returns

array
Records available only to this driver
public array
# getRecDriverFields( string $type )

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

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

Parameters

$type
Record type for which fields should be returned

Returns

array
Fields specific to this driver
public array
# getDomains( integer $perms = Horde_Perms::SHOW )

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

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

Parameters

$perms
Permissions filter for domain result set

Returns

array
Possibly empty array of domain information
public mixed
# getDomain( string $domainname )

Return SOA for a single domain

Return SOA for a single domain

Parameters

$domainname
$domain Domain for which to return SOA information

Returns

mixed
Array of SOA information for domain
public array
# getRecord( mixed $id )

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.

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.

Returns

array
Array of type and record information
public boolean
# recordExists( array $record, mixed $rectype )

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

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

Parameters

$record
record to check
$rectype

Returns

boolean
if records exits or or not
public mixed
# saveRecord( array & $info )

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

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

Parameters

$info
Data to be passed to backend driver for storage

Returns

mixed
True on success, PEAR::Error on error
public boolean
# deleteRecord( array & $info )

Delete record from backend

Delete record from backend

Parameters

$info
Reference to array of record information for deletion

Returns

boolean
true on success
public mixed
# factory( string $driver = null, array $params = null )

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

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

Parameters

$driver
<p>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.</p>
$params
<p>(optional) A hash containing any additional configuration or connection parameters a subclass might need.</p>

Returns

mixed

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

Properties summary
public array $_params

Hash containing connection parameters.

Hash containing connection parameters.

# array()
API documentation generated by ApiGen