Search the current list of options to see if there are any options with this value.
@param  string $value to search
@return boolean
482154
function optionExists($value) {
        foreach ($this->_options as $option) {
            if (isset($option['attr']['value']) && ($option['attr']['value'] == $value)) {
                return true;
            }
        }
        return false;
    }
461532
final public static function hasNumber ($value, array $options=[]) : bool
	{
		if (!self::hasValue($value))  new ErrorCode(1001);

		// Submitted values are strings, so use is_numeric instead of is_int
		if (!is_numeric($value)) return FALSE;

		if (!empty($options)) return static::hasLength($value, $options);

		return TRUE;
	}
911565
public function search( $value )
	{
		if( $value == $this->value )
			return $this;
		else if( $value < $this->value )
		{
			if( $this->left )
				return $this->left->search( $value );
		}
		else if( $value > $this->value )
		{
			if( $this->right )
				return $this->right->search( $value );
		}
		return NULL;
	}
648069
private function hasQueryOperators($value) : bool
    {
        if (! is_array($value) && ! is_object($value)) {
            return false;
        }

        if (is_object($value)) {
            $value = get_object_vars($value);
        }

        foreach ($value as $key => $_) {
            if (isset($key[0]) && $key[0] === '$') {
                return true;
            }
        }

        return false;
    }
674361
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return array_get($this->options, $option);
        }

        $this->options[$option] = $value;

        return $this;
    }
819237
public function search($value, $strict = false)
    {
        if (! $this->useAsCallable($value)) {
            return array_search($value, $this->items, $strict);
        }

        foreach ($this->items as $key => $item) {
            if (call_user_func($value, $item, $key)) {
                return $key;
            }
        }

        return false;
    }
1034488
public function filterByValueLike($value)
    {
        $callback = function (BindingInterface $binding, $key) use ($value) {
            return strpos($binding->getValue(), $value) !== false;
        };

        return $this->filter($callback);
    }
1224479
public function removeOptionsByValue($value)
    {
        $removed_options = array();

        foreach ($this->options as $key => $control_option) {
            if ($control_option->value === $value) {
                $removed_options[] = $control_option;

                // remove from options list
                unset($this->options[$key]);

                // remove metadata
                $metadata_key = $this->getOptionMetadataKey($control_option);
                unset($this->option_metadata[$metadata_key]);
            }
        }

        return $removed_options;
    }
33846
public function checkPlain($value)
    {
        if (!Type::isStringable($value)) {
            return false;
        }

        $string = "$value";

        return $string == strip_tags($string);
    }
1114225
public function isSameTypeAs($value): bool
    {
        if (!is_array($value) && !$value instanceof Traversable) {
            return false;
        }

        foreach ($value as $key => $val) {
            if (!($this->key->isSameTypeAs($key) && $this->value->isSameTypeAs($val))) {
                return false;
            }
        }

        return true;
    }
1315494
public function removeOptionByValue($value)
    {
        // walk all options
        $options = $this->options;

        // Empty options;
        $this->options = [];

        foreach ($options as $option) {
            if ($option instanceof Option) {
                if ($option->getValue() != $value) {
                    $this->options[] = $option;
                }
            } else {
                if ($option instanceof Optgroup) {
                    $subOptions = [];
                    $options2 = $option->getOptions();
                    foreach ($options2 as $option2) {
                        if ($option2->getValue() != $value) {
                            $subOptions[] = $option2;
                        }
                    }

                    $option->setOptions($subOptions);

                    if (sizeof($subOptions) > 0) {
                        $this->options[] = $option;
                    }
                }
            }
        }

        return $this;
    }
539044
public function Check($value)
    {
        $this->error = '';
        if ($this->currentFile && $value == $this->currentFile)
        {
            return true;
        }
        if (!Folder::Exists($this->folder))
        {
            return true;
        }
        $files = Folder::GetFiles($this->folder);
        if ($this->fileExtension)
        {
            $value = Path::AddExtension($value, $this->fileExtension);
        }
        if (in_array($value, $files))
        {
            $this->error = self::ExistsInFolder;
        }
        return $this->error == '';
    }
726106
private function tryGetOption($name, &$value) {
    if (array_key_exists($name, $this->options)) {
      $value = $this->options[$name];
      return true;
    }
    return false;
  }
1362514
protected function hasValue($value)
    {
        $value = (int) $value;

        return isset(static::$names[$value]) || array_key_exists($value, static::$names);
    }
836559
private function check($value) {

		if(true === is_string($value)) {
			
			@json_decode($value);

	 		return true === (json_last_error() == JSON_ERROR_NONE);
	 	}

	 	return false;
	}
337435
private function hasOperators($value)
    {

        if (!is_array($value) && !is_object($value)) {
            return false;
        }

        if (is_object($value)) {
            $value = get_object_vars($value);
        }

        foreach ($value as $key => $subValue) {
            if (true === $this->isOperator($key)) {
                return true;
            }
        }
        return false;
    }
633900
public function maybeInSet($value)
    {
        foreach ($this->positions($value) as $position) {
            if (!$this->getBitAtPosition($position)) {
                return false;
            }
        }
        return true;
    }