public function formatInput($data)
    {
        if ($data) {
            if (is_numeric(key($data))) {
                foreach ($data as $k => $v){
                    if (is_numeric($k) && is_array($v)) {
                        $data[$k] = static::formatInputRecord($v);
                    }
                }
            } else {
                $data = static::formatInputRecord($data);
            }
        }
        return $data;
    }
public function formatInput($data)
    {
        if ($data) {
            if (is_numeric(key($data))) {
                foreach ($data as $k => $v){
                    if (is_numeric($k) && is_array($v)) {
                        $data[$k] = static::formatInputRecord($v);
                    }
                }
            } else {
                $data = static::formatInputRecord($data);
            }
        }
        return $data;
    }
public function formatInput ( $ data ) { if ( $ data ) { if ( is_numeric ( key ( $ data ) ) ) { foreach ( $ data as $ k => $ v ) { if ( is_numeric ( $ k ) && is_array ( $ v ) ) { $ data [ $ k ] = static :: formatInputRecord ( $ v ) ; } } } else { $ data = static :: formatInputRecord ( $ data ) ; } } return $ data ; }
format one or more record input for insert or update, it will remove filed which not in master_fields

@param  array $data
@return array
format one or more record input for insert or update it will remove filed which not in master_fields