Relay.Calling.FaxResult
This object returned from faxReceive
and faxSend
methods that represents the final result of a sent or received Fax.
Methods
getDirection
Returns the direction of the fax: send
or receive
.
Available In:
Parameters
None
Returns
string
- send or receive.
Examples
<?php
$call->faxSend('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')->done(function($result) {
if ($result->isSuccessful()) {
echo $result->getDirection(); // => "send"
}
});
getEvent
Returns the last Relay Event arrived for this operation.
Available In:
Parameters
None
Returns
Relay.Event
- Last Relay Event.
Examples
<?php
$call->faxSend('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')->done(function($result) {
if ($result->isSuccessful()) {
print_r($result->getEvent());
}
});
getDocument
Returns the URL to the document send or received.
Available In:
Parameters
None
Returns
string
- URL to the document.
Examples
<?php
$call->faxReceive()->done(function($result) {
if ($result->isSuccessful()) {
echo $result->getDocument();
}
});
getIdentity
Returns the identity sending the fax.
Available In:
Parameters
None
Returns
string
- Identity that sent the document.
Examples
<?php
$call->faxReceive()->done(function($result) {
if ($result->isSuccessful()) {
echo $result->getIdentity();
}
});
getPages
Returns the number of pages in the document.
Available In:
Parameters
None
Returns
number
- Number of pages.
Examples
<?php
$call->faxReceive()->done(function($result) {
if ($result->isSuccessful()) {
echo $result->getPages();
}
});
getRemoteIdentity
Returns the remote identity sent or receiving the Fax.
Available In:
Parameters
None
Returns
string
- The remote identity.
Examples
<?php
$call->faxReceive()->done(function($result) {
if ($result->isSuccessful()) {
echo $result->getRemoteIdentity();
}
});
isSuccessful
Return true
if faxing succeeded, false
otherwise.
Available In:
Parameters
None
Returns
boolean
- True/False accordingly to the state.
Examples
<?php
$call->faxSend('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')->done(function($result) {
if ($result->isSuccessful()) {
// Fax sent successfully..
}
});