Interfax extends DeliveryMethod
Interfax service for sending faxes
Table of Contents
Properties
Methods
| __construct() | Constructs a new Interfax component |
| errors() | Returns all errors set in this object |
| getFileTypes() | Retrieves a list of available file types accepted by Interfax |
| getPageOrientations() | Retrieves a list of available page orientations |
| getPageSizes() | Retrieves a list of available page sizes accepted by Interfax |
| resetAll() | Resets all settings back to default except for the account username and password |
| send() | Sends a fax to Interfax |
| setAccount() | Sets the username and password for the Interfax account to send faxes from |
| setCallerId() | Sets the caller ID |
| setConfirmationEmail() | Sets an email address to send a confirmation to |
| setContacts() | Sets the contact names associated with a fax number. Fax numbers and contact names must maintain order. |
| setFile() | Sets the file and file type of the file to be faxed |
| setNumbers() | Sets the fax numbers to use for this fax |
| setPageOrientation() | Sets the page orientation of documents sent to Interfax. This applies to all files |
| setPageSize() | Sets the page size of documents sent to Interfax. This applies to all files |
| setResolution() | Sets the resolution of this fax |
| setSendTime() | Sets the date and time at which Interfax should dispatch the fax. Dates in the past will be sent immediately |
| setSubject() | Sets the subject of this fax, viewable in the Interfax account under Outpbound Queue |
| delimitValues() | Creates a list of values separated by $delimiter |
| parseResponse() | Parses the SOAP response from InterFax, sets any errors that may have been generated |
Properties
$ArrayHelper
private
DataStructureArray
$ArrayHelper
The data structure array helper object
$available_file_types
private
array<string|int, mixed>
$available_file_types
= ['HTML', 'DOC', 'PDF']
An array of available file types accepted by Interfax
$available_page_orientations
private
array<string|int, mixed>
$available_page_orientations
= ['Landscape', 'Portrait']
An array of available page orientations
$available_page_sizes
private
array<string|int, mixed>
$available_page_sizes
= ['A4', 'Letter', 'Legal', 'B4']
An array of available page sizes accepted by Interfax
$contacts
private
array<string|int, mixed>
$contacts
= []
The contact names to send to
$csid
private
string
$csid
The caller ID that is displayed
$email_confirmation
private
string
$email_confirmation
A single email address to send a confirmation to
$fax_numbers
private
array<string|int, mixed>
$fax_numbers
= []
The fax numbers to send to
$files
private
array<string|int, mixed>
$files
= []
An array of bitstream data, file types, and file sizes representing each file to send
$page_orientation
private
string
$page_orientation
The page orientation of the documents
$page_size
private
string
$page_size
The page size of the documents sent
$password
private
string
$password
The account password
$postpone_time
private
string
$postpone_time
The atomic datetime to send the fax. A time in the past sends immediately
$resolution
private
string
$resolution
The quality of the resolution: 0 for standard, 1 for fine
$subject
private
string
$subject
The subject displayed in the Outbound Queue in Interfax
$url
private
static string
$url
= 'https://ws.interfax.net/dfs.asmx'
The URL to submit requests to
$username
private
string
$username
The account user name
Methods
__construct()
Constructs a new Interfax component
public
__construct() : mixed
errors()
Returns all errors set in this object
public
errors() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of error info
getFileTypes()
Retrieves a list of available file types accepted by Interfax
public
getFileTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A numerically-indexed array of available file types
getPageOrientations()
Retrieves a list of available page orientations
public
getPageOrientations() : array<string|int, mixed>
Return values
array<string|int, mixed> —A numerically-indexed array of available page orientations
getPageSizes()
Retrieves a list of available page sizes accepted by Interfax
public
getPageSizes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A numerically-indexed array of available page sizes
resetAll()
Resets all settings back to default except for the account username and password
public
resetAll() : mixed
send()
Sends a fax to Interfax
public
send() : mixed
setAccount()
Sets the username and password for the Interfax account to send faxes from
public
setAccount(string $username, string $password) : mixed
Parameters
- $username : string
-
The account username
- $password : string
-
The account password
setCallerId()
Sets the caller ID
public
setCallerId(string $caller_id) : mixed
Parameters
- $caller_id : string
-
The caller ID
setConfirmationEmail()
Sets an email address to send a confirmation to
public
setConfirmationEmail(string $email_address) : mixed
Parameters
- $email_address : string
-
An email address
setContacts()
Sets the contact names associated with a fax number. Fax numbers and contact names must maintain order.
public
setContacts(mixed $contacts) : mixed
Parameters
- $contacts : mixed
-
An array of contact names, or a single contact name
setFile()
Sets the file and file type of the file to be faxed
public
setFile(array<string|int, mixed> $files) : mixed
Parameters
- $files : array<string|int, mixed>
-
A numerically-indexed array of files and their types:
- file The bitstream of the file to send in binary
- type The type of file this is (i.e. HTML, DOC, or PDF), (optional, default PDF)
setNumbers()
Sets the fax numbers to use for this fax
public
setNumbers(mixed $fax_numbers) : mixed
Parameters
- $fax_numbers : mixed
-
An array of fax numbers, or a single fax number
setPageOrientation()
Sets the page orientation of documents sent to Interfax. This applies to all files
public
setPageOrientation(string $orientation) : mixed
Parameters
- $orientation : string
-
The page orientation to set (i.e. Landscape or Portrait)
setPageSize()
Sets the page size of documents sent to Interfax. This applies to all files
public
setPageSize(string $page_size) : mixed
Parameters
- $page_size : string
-
The page size to set (i.e. A4, Letter, Legal, or B4)
setResolution()
Sets the resolution of this fax
public
setResolution(int $resolution) : mixed
Parameters
- $resolution : int
-
The resolution quality of the fax. 1 for fine, 0 for standard
setSendTime()
Sets the date and time at which Interfax should dispatch the fax. Dates in the past will be sent immediately
public
setSendTime(string $time) : mixed
Parameters
- $time : string
-
A valid PHP date time stamp
setSubject()
Sets the subject of this fax, viewable in the Interfax account under Outpbound Queue
public
setSubject(string $subject) : mixed
Parameters
- $subject : string
-
The subject name
delimitValues()
Creates a list of values separated by $delimiter
private
delimitValues(array<string|int, mixed> $field[, string $delimiter = ';' ]) : mixed
Parameters
- $field : array<string|int, mixed>
-
A numerically-indexed array of values to delimit
- $delimiter : string = ';'
-
The separator to use as the delimiter between values (optional, default ;)
parseResponse()
Parses the SOAP response from InterFax, sets any errors that may have been generated
private
parseResponse(string $response) : bool
Parameters
- $response : string
-
The SOAP response from InterFax
Return values
bool —true on success, false on error