Swat/SwatIntegerEntry.php
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        try {
            $integer_value = $this->getNumericValue($this->value);

            if ($integer_value === null) {
                $this->addMessage($this->getValidationMessage('integer'));
            } else {
                $this->value = $integer_value;
            }
        } catch (SwatIntegerOverflowException $e) {
            if ($e->getSign() > 0) {
                $this->addMessage(
                    $this->getValidationMessage('integer-maximum')
                );
            } else {
                $this->addMessage(
                    $this->getValidationMessage('integer-minimum')
                );
            }

            $integer_value = null;
        }
    }
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        try {
            $integer_value = $this->getNumericValue($this->value);

            if ($integer_value === null) {
                $this->addMessage($this->getValidationMessage('integer'));
            } else {
                $this->value = $integer_value;
            }
        } catch (SwatIntegerOverflowException $e) {
            if ($e->getSign() > 0) {
                $this->addMessage(
                    $this->getValidationMessage('integer-maximum')
                );
            } else {
                $this->addMessage(
                    $this->getValidationMessage('integer-minimum')
                );
            }

            $integer_value = null;
        }
    }
public function process ( ) { parent :: process ( ) ; if ( $ this -> value === null ) { return ; } try { $ integer_value = $ this -> getNumericValue ( $ this -> value ) ; if ( $ integer_value === null ) { $ this -> addMessage ( $ this -> getValidationMessage ( 'integer' ) ) ; } else { $ this -> value = $ integer_value ; } } catch ( SwatIntegerOverflowException $ e ) { if ( $ e -> getSign ( ) > 0 ) { $ this -> addMessage ( $ this -> getValidationMessage ( 'integer-maximum' ) ) ; } else { $ this -> addMessage ( $ this -> getValidationMessage ( 'integer-minimum' ) ) ; } $ integer_value = null ; } }
Checks to make sure value is an integer

If the value of this widget is not an integer then an error message is
attached to this widget.
Checks to make sure value is an integer