src/PAGI/Node/Node.php
protected function stateToString($state)
    {
        switch ($state) {
            case self::STATE_CANCEL:
                return "cancel";
            case self::STATE_COMPLETE:
                return "complete";
            case self::STATE_NOT_RUN: // a string like 'foo' matches here?
                return "not run";
            case self::STATE_TIMEOUT:
                return "timeout";
            case self::STATE_MAX_INPUTS_REACHED:
                return "max valid input attempts reached";
            default:
                throw new NodeException("Bad state for node");
        }
    }
protected function stateToString($state)
    {
        switch ($state) {
            case self::STATE_CANCEL:
                return "cancel";
            case self::STATE_COMPLETE:
                return "complete";
            case self::STATE_NOT_RUN: // a string like 'foo' matches here?
                return "not run";
            case self::STATE_TIMEOUT:
                return "timeout";
            case self::STATE_MAX_INPUTS_REACHED:
                return "max valid input attempts reached";
            default:
                throw new NodeException("Bad state for node");
        }
    }
protected function stateToString ( $ state ) { switch ( $ state ) { case self :: STATE_CANCEL : return "cancel" ; case self :: STATE_COMPLETE : return "complete" ; case self :: STATE_NOT_RUN : // a string like 'foo' matches here? return "not run" ; case self :: STATE_TIMEOUT : return "timeout" ; case self :: STATE_MAX_INPUTS_REACHED : return "max valid input attempts reached" ; default : throw new NodeException ( "Bad state for node" ) ; } }
Maps the current node state to a human readable string.

@param integer $state One of the STATE_* constants.

@return string
@throws Exception\NodeException
Maps the current node state to a human readable string .