<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

/**
 * Set number input
 *
 * @author Igor Ratsun
 */
class Rtgc_number extends \Rtgc_input
{
    protected $options = [
        'type' => 'number',
        'min'  => 0,
    ];

    public function filter_by($column, $value)
    {
        if (strlen($value) == 0) {
            return;
        }
        get_instance()->db->where($column, (int)$value);
    }
}
