\Hylax_Storage_sql

Hylax_Storage_sql Class

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

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
Hylax_Storage()
saveFaxData()
createFax()
getFaxData()
listFaxes()
send()
factory()
singleton()
Hylax_Storage_sql()
newFaxId()
_createFax()
_listFaxes()
getFax()
getFaxFolder()
_setFaxNumber()
_setJobId()
_getFolder()
getGateways()
getGateway()
saveGateway()
deleteGateway()
saveMessage()
saveSend()
_getMessages()
_getSends()
initialise()
$_params
$_vfs
$_db
$_attributes
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

A hash containing any parameters for the current storage driver.

Type

array

$_vfs

$_vfs : \VFS

Type

\VFS

$_db

$_db : \DB

Handle for the database connection.

Type

\DB

Methods

Hylax_Storage()

Hylax_Storage(array  $params) 

Constructor

Parameters

array $params

Any parameters needed for this storage driver.

Throws

\Horde_Exception

saveFaxData()

saveFaxData(  $data,   $type = '.ps') 

Parameters

$data
$type

createFax()

createFax(  $info,   $fix_owner = false) 

Parameters

$info
$fix_owner

getFaxData()

getFaxData(  $fax_id) 

Parameters

$fax_id

listFaxes()

listFaxes(  $folder) 

Parameters

$folder

send()

send(  $fax_id,   $number) 

Parameters

$fax_id
$number

factory()

factory(string  $driver, array  $params = array()) : \Hylax_Storage

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

Parameters

string $driver

The type of concrete Hylax_Storage subclass to return.

array $params

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

Throws

\Horde_Exception

Returns

\Hylax_Storage

The newly created concrete Hylax_Storage instance, or false on error.

singleton()

singleton(string  $driver, array  $params = array()) : mixed

Attempts to return a reference to a concrete Hylax_Storage instance based on $driver.

It will only create a new instance if no Hylax_Storage instance with the same parameters currently exists.

This should be used if multiple storage sources are required.

This method must be invoked as: $var = &Hylax_Storage::singleton()

Parameters

string $driver

The type of concrete Hylax_Storage subclass to return.

array $params

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

Returns

mixed —

The created concrete Hylax_Storage instance, or false on error.

Hylax_Storage_sql()

Hylax_Storage_sql(  $params) 

Parameters

$params

newFaxId()

newFaxId() 

_createFax()

_createFax(  $info) 

Parameters

$info

_listFaxes()

_listFaxes(  $folder) 

Parameters

$folder

getFax()

getFax(  $fax_id) 

Parameters

$fax_id

getFaxFolder()

getFaxFolder(  $fax_id) 

Parameters

$fax_id

_setFaxNumber()

_setFaxNumber(  $fax_id,   $number) 

Parameters

$fax_id
$number

_setJobId()

_setJobId(  $fax_id,   $job_id) 

Parameters

$fax_id
$job_id

_getFolder()

_getFolder(  $folder,   $path = null) 

Parameters

$folder
$path

getGateways()

getGateways() : array

Fetches a list of available gateways.

Returns

array —

An array of the available gateways.

getGateway()

getGateway(integer  $gateway_id) : array

Fetches a gateway from the backend.

Parameters

integer $gateway_id

The gateway id to fetch.

Returns

array —

An array containing the gateway settings and parameters.

saveGateway()

saveGateway(array  $info) : mixed

Saves a gateway to the backend.

Parameters

array $info

The gateway settings to be saved passed by reference as an array.

Returns

mixed —

Gateway id on success or a PEAR error on failure.

deleteGateway()

deleteGateway(integer  $gateway_id) : mixed

Deletes a gateway from the backend.

Parameters

integer $gateway_id

The gateway id of the gateway to delete.

Returns

mixed —

True on success or a PEAR error on failure.

saveMessage()

saveMessage(integer  $gateway_id, string  $message_text, string  $message_params, string  $message_batch_id = null) : mixed

Saves a message to the backend.

Parameters

integer $gateway_id

The id of the gateway used to send this message.

string $message_text

The text of the message.

string $message_params

Any send params used for this message.

string $message_batch_id

If batch sending is used, the batch id of this message.

Returns

mixed —

True on success or PEAR Error on failure.

saveSend()

saveSend(integer  $message_id, string  $remote_id, string  $recipient, string  $error) : mixed

Saves an individual send to the backend. This will be one instance of a message being sent to a recipient.

Parameters

integer $message_id

The message id.

string $remote_id

The text of the message.

string $recipient

Any send params used for this

string $error

Any send params used for this

Returns

mixed —

The send id on success or PEAR Error on failure.

_getMessages()

_getMessages() : mixed

Gets all the messages for the current user.

Returns

mixed —

The array of messages on success or PEAR Error on failure.

_getSends()

_getSends(  $message_ids) : mixed

Fetches all sends for one or more message ids.

Parameters

$message_ids

Returns

mixed —

The send id on success or PEAR Error on failure.

initialise()

initialise()