PAGI\Client\Result\DataReadResult

This decorated result adds the functionality to check for user input (more than one digit).

PHP Version 5

Properties

$digits

protected string $digits

Digits read (if any).

  • Visibility: protected

$timeout

protected boolean $timeout

Timeout?

  • Visibility: protected

$result

private \PAGI\Client\Result\IResult $result

Our decorated result.

  • Visibility: private

Methods

__construct

void PAGI\Client\Result\ResultDecorator::__construct(\PAGI\Client\Result\IResult $result)

Constructor.

Arguments

isTimeout

boolean PAGI\Client\Result\IReadResult::isTimeout()

True if the operation completed and no input was received from the user.

getDigits

string PAGI\Client\Result\IReadResult::getDigits()

Returns digits read. False if none.

getDigitsCount

integer PAGI\Client\Result\IReadResult::getDigitsCount()

Returns the number of digits read.

getOriginalLine

string PAGI\Client\Result\IResult::getOriginalLine()

Returns original line.

getCode

integer PAGI\Client\Result\IResult::getCode()

Returns the integer value of the code returned by agi.

getResult

integer PAGI\Client\Result\IResult::getResult()

Returns result (result=xxx) from the result.

isResult

boolean PAGI\Client\Result\IResult::isResult(string $value)

Compares result to a given value.

Arguments

  • $value string - <p>Value to match against.</p>

hasData

boolean PAGI\Client\Result\IResult::hasData()

Returns true if this command returned any data.

getData

string PAGI\Client\Result\IResult::getData()

Returns data, if any. False if none.

__toString

string PAGI\Client\Result\ResultDecorator::__toString()

Standard procedure.