Documentation

Beatnik_Driver
in package

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.

Tags
author

Ben Klang ben@alkaloid.net

Table of Contents

$_params  : array<string|int, mixed>
Hash containing connection parameters.
Beatnik_Driver()  : 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.
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

$_params

Hash containing connection parameters.

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

Methods

Beatnik_Driver()

public Beatnik_Driver([mixed $params = array() ]) : mixed
Parameters
$params : mixed = array()
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

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