<?php
/**
 * A class for validating numbers against an integer regex pattern and
 * minimum/maximum range constraints.
 */
class validator_integer extends validator_numeric
{
    ////////////////////////////////////////////////////////////////////////////
    // Construct and destruct functions.

    /**
     * @param integer (optional) $minimum The minimum value constraint.
     * @param integer (optional) $maximum The maximum value constraint.
     * @param boolean (optional) $inclusive Whether the minimum/maximum
     * constraint is inclusive or not.
     * @param string (optional) $error The error message.
     * @param boolean (optional) $reverse Whether the validator is in reverse
     * mode or not.
     */
    public function __construct($minimum = null, $maximum = null, $inclusive = true, $error = null, $reverse = false)
    {
        parent::__construct('~^-?[0-9]+$~', $minimum, $maximum, $inclusive, $error, $reverse);
    }

    ////////////////////////////////////////////////////////////////////////////
    // Overload functions.

    ////////////////////////////////////////////////////////////////////////////
    // Interface functions.

    ////////////////////////////////////////////////////////////////////////////
    // Internal functions.
}
