public function setResultMode($mode)
    {
        if( !is_int($mode) || $mode < 0 || $mode > 3 ) {
            throw new InvalidArgumentException("Invalid result mode");
        }
        $this->resultMode = $mode;
        return $this;
    }
public function setResultMode($mode)
    {
        if( !is_int($mode) || $mode < 0 || $mode > 3 ) {
            throw new InvalidArgumentException("Invalid result mode");
        }
        $this->resultMode = $mode;
        return $this;
    }
public function setResultMode ( $ mode ) { if ( ! is_int ( $ mode ) || $ mode < 0 || $ mode > 3 ) { throw new InvalidArgumentException ( "Invalid result mode" ) ; } $ this -> resultMode = $ mode ; return $ this ; }
Set result mode

@param integer $mode
@return $this
@throws InvalidArgumentException
Set result mode