@param string $field_path
@param string $min_x
@param string $max_x
@param string $or_union_name

@return \Interpro\Extractor\Contracts\Selection\SelectionUnit
771523
public function notInRange($field_path, $min_x, $max_x, $or_union_name = null)
    {
        $newUnit = new SpecificationNotInRange($this->type, $field_path, $min_x, $max_x);
        $this->specificationSet->addUnit($newUnit, $or_union_name);

        return $this;
    }
209097
public static function ruleLenRange($min, $max)
    {
        return function ($input) use ($min, $max) {
            return strlen($input) >= $min && strlen($input) <= $max;
        };
    }
666632
protected function setErrorLengthRange($field, $label, $min = 1, $max = 255)
    {
        $vars = array('@min' => $min, '@max' => $max, '@field' => $label);
        $error = $this->translation->text('@field must be @min - @max characters long', $vars);
        return $this->setError($field, $error);
    }
1084840
public static function getSelectTree($source,$idField,$pidField,$titleField,$separator="&nbsp;&nbsp;&nbsp;&nbsp;",$prefix="|-",$level=-1)
    {
        $target=[];
        foreach ($source as $item){
            $pid=$item[$pidField];
            if(empty($pid)){
                $id=$item[$idField];
                $title=$item[$titleField];
                $target[$id]=$title;
                self::_getSelectTreeChildren($target,$id,$source,$idField,$pidField,$titleField,$separator,$prefix,$level,1);
            }
        }
        return $target;
    }
1189120
public static function lengthChar($val, $min, $max = null)
    {
        $len = mb_strlen($val, 'utf8');
        $result = ($len >= $min);
        if($max !== null)
        {
            $result = ($result && $len <= $max);
        }
        return $result;
    }
58838
public static function SendFile ($file_path, $file_name = null, $mime_type = null, $options = []) {
		//==============================================
		//オプション展開
		//==============================================
		$filename_from_charset	= $options['from_charset']			?? Encoding::UTF_8;
		$filename_to_charset	= $options['to_charset']			?? Encoding::SJIS;
		$chunk_size				= $options['chunk_size']			?? static::CHUNK_SIZE;
		$content_disposition	= $options['content_disposition']	?? static::CONTENT_DISPOSITION_ATTACHMENT;

		//==============================================
		//ファイル存在確認
		//==============================================
		if (($status = FileSystem::IsReadableFile($file_path, $options)) !== true) {
			return $status;
		}

		//==============================================
		//ファイル情報取得
		//==============================================
		$file_size = filesize($file_path);

		//==============================================
		//ファイル名確定
		//==============================================
		$file_name = $file_name ?: basename($file_path);

		//==============================================
		//mime type確定
		//==============================================
		if ($mime_type === null) {
			$ext = pathinfo($file_name, \PATHINFO_EXTENSION);
			$mime_type = isset(self::GetMimeTypeMapForExt()[$ext]) ? self::GetMimeTypeMapForExt()[$ext] : self::MIME_TYPE_BINARY;
		}

		//==============================================
		//ファイル送信開始
		//==============================================
		//HTTP ResponseHeaderの出力
		foreach (static::GetHttpHeaderContentDispositionAttachment(
			$file_name,
			$file_size,
			$mime_type,
			$content_disposition,
			$filename_to_charset,
			$filename_from_charset
		) as $header) {
			header(str_replace(["\r", "\n"], '', $header));
		}

		//----------------------------------------------
		//実処理の開始
		//----------------------------------------------
		//既存の出力を全て送信
		OutputBuffer::Clean();
		flush();

		//file pointer open
		$fp = fopen($file_path, 'rb');

		//timeout引き延ばし処理：実行開始秒
		$split_time = time();

		//チャンクサイズごとに送信
		while (!feof($fp)) {
			print fread($fp, $chunk_size);
			flush();

			//3秒以上経過ごとにタイムリミットを延長する
			if (time() - $split_time > 3) {
				set_time_limit(time() - $split_time);
			}
		}

		//==============================================
		//処理の終了
		//==============================================
		fclose($fp);
	}
590740
public ZealotKhala orIsNull(String field) {
        return this.doIsNull(ZealotConst.OR_PREFIX, field, true,true);
    }
598596
public static function fetchQuantifier($min = null, $max = INF, bool $lazyLoad = false) : string
    {
        $lazy = $lazyLoad ? '?' : '';

        switch (true) {
            case ($min === 0 && $max === 1):
                return '?'.$lazy;
            case ($min === 0 && $max === INF):
                return '*'.$lazy;
            case ($min === 1 && $max === INF):
                return '+'.$lazy;
            case (is_int($min) && $min >= 1 && $max === null):
                return '{'.$min.'}'.$lazy;
            case (is_int($min) && (is_int($max) || $max === INF)):
                $max = is_int($max) ? $max : '';
                return '{'.$min.','.$max.'}'.$lazy;
            default:
                return '';
        }
    }
527989
public function getRangeOptions($min, $max, $step)
    {
        $options = [];
        
        foreach (range($min, $max, $step) as $value) {
            $options[number_format($value, 1)] = number_format($value, 1);
        }
        
        return $options;
    }
18093
public function _validation_numeric_between($val, $min_val, $max_val)
	{
		return $this->_empty($val) or (floatval($val) >= floatval($min_val) and floatval($val) <= floatval($max_val));
	}
620034
public function orWhere(string $fieldName, string $operation, $value)
    {
        return $this->where($fieldName, $operation, $value, LogicalOperator::OR);
    }
443248
public static function fieldNotInRange(string $field, int $value, int $min, int $max) : self
    {
        return new DateTimeException("Invalid $field: $value is not in the range $min to $max.");
    }
976020
public function validate($mInput, $oField)
    {
        $mInput = parent::validate($mInput, $oField);

        if (!is_numeric($mInput)) {
            throw new FieldTypeException('This field should be numeric.', 1);
        }

        return $mInput;
    }
507196
function ruleMax($max, $error_message = null) {
        if (!is_numeric($max)) {
            throw new \Exception('Incorrect parameter MAX in rule max');
        }

        return $this->_rule('max:' . $max, $error_message);
    }
535566
public ZealotKhala orIsNotNull(String field) {
        return this.doIsNull(ZealotConst.OR_PREFIX, field, true,false);
    }
1115236
public function moreThen($field_path, $value, $or_union_name = null)
    {
        $newUnit = new SpecificationMoreThan($this->type, $field_path, $value);
        $this->specificationSet->addUnit($newUnit, $or_union_name);

        return $this;
    }
1017785
function Field(attrs, opts) {
  var name = attrs.name;
  if (typeof name != 'string' || !isValidName(name)) {
    throw new Error(f('invalid field name: %s', name));
  }

  this._name = name;
  this._type = createType(attrs.type, opts);
  this._aliases = attrs.aliases || [];

  this._order = (function (order) {
    switch (order) {
      case 'ascending':
        return 1;
      case 'descending':
        return -1;
      case 'ignore':
        return 0;
      default:
        throw new Error(f('invalid order: %j', order));
    }
  })(attrs.order === undefined ? 'ascending' : attrs.order);

  var value = attrs['default'];
  if (value !== undefined) {
    // We need to convert defaults back to a valid format (unions are
    // disallowed in default definitions, only the first type of each union is
    // allowed instead).
    // http://apache-avro.679487.n3.nabble.com/field-union-default-in-Java-td1175327.html
    var type = this._type;
    var val = type._copy(value, {coerce: 2, wrap: 2});
    // The clone call above will throw an error if the default is invalid.
    if (isPrimitive(type.getTypeName()) && type.getTypeName() !== 'bytes') {
      // These are immutable.
      this.getDefault = function () { return val; };
    } else {
      this.getDefault = function () { return type._copy(val); };
    }
  }
}