Overview

Packages

  • None
  • Shout

Classes

  • AccountDetailsForm
  • ConferenceDetailsForm
  • DeviceDetailsForm
  • ExtensionDetailsForm
  • MenuForm
  • NumberDetailsForm
  • RecordingDetailsForm
  • Shout
  • Shout_Ajax_Application
  • Shout_Driver
  • Shout_Driver_Ldap
  • Shout_Driver_Sql
  • Overview
  • Package
  • Class
  • Tree

Class Shout_Driver

Shout_Driver:: defines an API for implementing storage backends for Shout.

Copyright 2005-2010 Alkaloid Networks LLC (http://projects.alkaloid.net)

See the enclosed file COPYING for license information (BSD). If you did not receive this file, see http://www.opensource.org/licenses/bsd-license.php.

Direct known subclasses

Shout_Driver_Ldap, Shout_Driver_Sql
Package: Shout
Author: Ben Klang ben@alkaloid.net
Located at Driver.php
Methods summary
public
# __construct( mixed $params = array() )
public array
# getAccounts( optional $filters = "all", optional $filterperms = null )

Get a list of accounts from the instantiated driver and filter the returned accounts for those which the current user can see/edit

Get a list of accounts from the instantiated driver and filter the returned accounts for those which the current user can see/edit

Parameters

$filters
<p>$filter Filter for types of accounts to return. One of "system" "customer" or "all"</p>
$filterperms
$filterperms Filter accounts for given permissions

Returns

array
Accounts valid for this user
public boolean
# checkAccountType( string $account, string $type )

For the given account and type, make sure the account has the appropriate properties, that it is effectively of that "type"

For the given account and type, make sure the account has the appropriate properties, that it is effectively of that "type"

Parameters

$account
the account to check type for
$type
the type to verify the account is of

Returns

boolean
true of the account is of type, false if not
public array
# getUsers( string $account )

Get a list of users valid for the current account. Return an array indexed by the extension.

Get a list of users valid for the current account. Return an array indexed by the extension.

Parameters

$account
Account for which users should be returned

Returns

array
User information indexed by voice mailbox number
public string
# getHomeAccount( )

Returns the name of the user's default account

Returns the name of the user's default account

Returns

string
User's default account
public integer
# getAccountProperties( string $account )

Get a account's properties

Get a account's properties

Parameters

$account
Account for which to get properties

Returns

integer
Bitfield of properties valid for this account
public array
# getDialplan( string $account )

Get a account's extensions and return as a multi-dimensional associative array

Get a account's extensions and return as a multi-dimensional associative array

Parameters

$account
account to return extensions for

Returns

array
Multi-dimensional associative array of extensions data
public true
# saveExtension( string $account, string $extension, array $details )

Save an extension to the backend.

Save an extension to the backend.

This method is intended to be overridden by a child class. However it also implements some basic checks, so a typical backend will still call this method via parent::

Parameters

$account
Account to which the user should be added
$extension
Extension to be saved
$details
Phone numbers, PIN, options, etc to be saved

Returns

true
on success, PEAR::Error object on error

Throws

Shout_Exception
public
# deleteExtension( mixed $account, mixed $extension )
public true
# saveDevice( string $account, string $devid, array & $details )

Save a device to the backend.

Save a device to the backend.

This method is intended to be overridden by a child class. However it also implements some basic checks, so a typical backend will still call this method via parent::

Parameters

$account
Account to which the user should be added
$devid
$extension Extension to be saved
$details
Phone numbers, PIN, options, etc to be saved

Returns

true
on success, PEAR::Error object on error

Throws

Shout_Exception
public
# deleteDevice( <type> $account, <type> $devid )

Delete a device from the backend.

Delete a device from the backend.

This method is intended to be overridden by a child class. However it also implements some basic checks, so a typical backend will still call this method via parent::

Parameters

$account
$devid
public mixed &
# factory( string $class, array $driver = null, mixed $params = null )

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

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

Parameters

$class
<p>$driver The type of the concrete Shout_Driver subclass to return. The class name is based on the storage driver ($driver). The code is dynamically included.</p>
$driver
<p>$params (optional) A hash containing any additional configuration or connection parameters a subclass might need.</p>
$params

Returns

mixed

The newly created concrete Shout_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