PHP Class PAGI\Client\Result\AmdResult

PHP Version 5
Author: Marcelo Gornstein ([email protected])
Inheritance: extends ExecResult
Show file Open project: marcelog/pagi Class Usage Examples

Public Methods

Method Description
__construct ( PAGI\Client\Result\IResult $result ) : void Constructor.
__toString ( ) (non-PHPdoc)
getCause ( ) : string Returns the cause string.
getStatus ( ) : string Returns the status string.
isCauseGreeting ( ) : boolean True if AMD status is due to a long greeting detected.
isCauseHuman ( ) : boolean True if AMD status is due to a silence after a greeting.
isCauseInitialSilence ( ) : boolean True if AMD status is due to a silence duration.
isCauseTooLong ( ) : boolean True if AMD status is due to a timeout when detecting.
isCauseWordLength ( ) : boolean True if AMD status is due to a maximum number of words reached.
isHangup ( ) : boolean True if AMD detected a hangup.
isHuman ( ) : boolean True if AMD detected a human.
isMachine ( ) : boolean True if AMD detected an answering machine.
isNotSure ( ) : boolean True if AMD failed detecting an answering machine or human.
setCause ( string $cause ) : void Sets the cause string
setStatus ( $status ) : void Sets the cause string

Private Methods

Method Description
isCause ( string $string ) : boolean True if the cause equals the given string
isStatus ( string $string ) : boolean True if the status equals the given string

Method Details

__construct() public method

Constructor.
public __construct ( PAGI\Client\Result\IResult $result ) : void
$result PAGI\Client\Result\IResult Result to decorate.
return void

__toString() public method

(non-PHPdoc)
public __toString ( )

getCause() public method

Returns the cause string.
public getCause ( ) : string
return string

getStatus() public method

Returns the status string.
public getStatus ( ) : string
return string

isCauseGreeting() public method

True if AMD status is due to a long greeting detected.
public isCauseGreeting ( ) : boolean
return boolean

isCauseHuman() public method

True if AMD status is due to a silence after a greeting.
public isCauseHuman ( ) : boolean
return boolean

isCauseInitialSilence() public method

True if AMD status is due to a silence duration.
public isCauseInitialSilence ( ) : boolean
return boolean

isCauseTooLong() public method

True if AMD status is due to a timeout when detecting.
public isCauseTooLong ( ) : boolean
return boolean

isCauseWordLength() public method

True if AMD status is due to a maximum number of words reached.
public isCauseWordLength ( ) : boolean
return boolean

isHangup() public method

True if AMD detected a hangup.
public isHangup ( ) : boolean
return boolean

isHuman() public method

True if AMD detected a human.
public isHuman ( ) : boolean
return boolean

isMachine() public method

True if AMD detected an answering machine.
public isMachine ( ) : boolean
return boolean

isNotSure() public method

True if AMD failed detecting an answering machine or human.
public isNotSure ( ) : boolean
return boolean

setCause() public method

Sets the cause string
public setCause ( string $cause ) : void
$cause string
return void

setStatus() public method

Sets the cause string
public setStatus ( $status ) : void
return void