Binds a rule parameter.

@return ValidatorAssistant
173578
public function bind()
    {
        if (func_num_args()) {
            $bindings = new Bindings(func_get_args(), $this->rules);
            $this->rules = $bindings->rules();
        }

        return $this;
    }
279032
public function bindComponentsViaSetter($instanceName, $setterName, $paramValue) {
		if ($paramValue == null) {
			unset($this->declaredInstances[$instanceName]["setterBinds"][$setterName]);
		} else {
			$this->declaredInstances[$instanceName]["setterBinds"][$setterName] = $paramValue;
		}
	}
1138976
public function setValidator($validator)
    {
        $this->clearCache();
        $this->validators = [];
        $this->addValidator($validator);

        return $this;
    }
24988
public function execute()
    {
        $to_compare_with = func_get_arg(0);
        $mode = func_num_args() == 1 ? '=' : func_get_arg(1);
        
        $modes = [
            '=',
            '>',
            '<',
            '>=',
            '<='
        ];
        
        if (! in_array($mode, $modes)) {
            Throw new ValidatorException(sprintf('Parameter "%s" not allowed', $mode), 1001);
        }
        
        switch ($mode) {
            case '=':
                $result = $this->value == $to_compare_with;
                break;
            
            case '>':
                $result = $this->value > $to_compare_with;
                break;
            
            case '<':
                $result = $this->value < $to_compare_with;
                break;
            
            case '>=':
                $result = $this->value >= $to_compare_with;
                break;
            
            case '<=':
                $result = $this->value <= $to_compare_with;
                break;
        }
        
        if (! $result) {
            $this->msg = [
                'validator.rule.compare',
                [
                    $this->value,
                    $to_compare_with,
                    $mode
                ]
            ];
        }
    }
1143634
private function bindParameters()
    {
        $bindedParameterReferences = array(implode('', $this->bindedTypes));
        $lobParameters = array();
        $null = null;

        foreach ($this->bindedParameters as $key => &$parameter) {
            if (isset($this->bindedTypes[$key - 1])
                && ($this->bindedTypes[$key - 1] === self::$mappedTypes[\PDO::PARAM_LOB])) {
                $lobParameters[$key - 1] = $parameter;
                $bindedParameterReferences[$key] = &$null;
            } else {
                $bindedParameterReferences[$key] = &$parameter;
            }
        }

        call_user_func_array(array($this->mysqliStatement, 'bind_param'), $bindedParameterReferences);

        foreach ($lobParameters as $key => $lobParameter) {
            rewind($lobParameter);

            while (!feof($lobParameter)) {
                $this->mysqliStatement->send_long_data(
                    $key,
                    fread($lobParameter, $this->connection->getMaxAllowedPacket())
                );
            }
        }
    }
758406
protected function registerParameterBinder()
    {
        $this->app->singleton(RouteBinderRegister::class, function (Container $container) {
            return new RouteBinderRegister($container, $container->make('router'));
        });
    }
525525
public function bind(array $parameters = [])
    {
        foreach ($this->formProperties as $key => $property) {
            if (isset($parameters[$property['uri']])) {
                $value = $parameters[$property['uri']];
            } else {
                $value = '';
            }
            $this->formProperties[$key]['formValue'] = $value;
        }
        return $this;
    }
648304
protected function bindUserProvider()
    {
        $userProvider = $this->app['config']->get('revisionable.userprovider');

        switch ($userProvider) {
            case 'sentry':
                $this->bindSentryProvider();
                break;

            case 'sentinel':
                $this->bindSentinelProvider();
                break;

            case 'jwt-auth':
                $this->bindJwtAuthProvider();
                break;

            case 'session':
                $this->bindSessionProvider();
                break;

            default:
                $this->bindGuardProvider();
                break;
        }
        $this->app->alias('revisionable.userprovider', UserProvider::class);
    }
529784
protected function registerRequestRebindHandler()
    {
        $this->app->rebinding('request', function ($app, $request) {
            $request->setUserResolver(function ($guard = null) use ($app) {
                return call_user_func($app['auth']->userResolver(), $guard);
            });
        });
    }
49019
final public function bind(array $params = array())
	{
		$params = $this->bindConversion($params);
		array_map(
			[$this, 'bindParam'],
			array_keys($params),
			array_values($params)
		);

		return $this;
	}
913075
public static function validator(RuleInterface $rule, ContainerInterface $container = null): ValidatorInterface
    {
        $validator = new static($rule, $container);

        return $validator;
    }
1183651
public function Bind()
	{
		$this->getAbstractNode(0)->Bind();
		/**
		 * @var QName $qname
		 */
		$qname = $this->getQNVarName();
		$this->_varRef = $this->getContext()->RunningContext->NameBinder->PushVar( $qname );
		$this->getAbstractNode(1)->Bind();
		$this->getContext()->RunningContext->NameBinder->PopVar();
	}
805928
public function addValidator($rule, $callback)
    {
        $method = 'validate_'.$rule;

        if (method_exists(__CLASS__, $method) || isset($this->validation_methods[$rule])) {
            throw new Exception("Validator rule '$rule' already exists.");
        }

        $this->validation_methods[$rule] = $callback;

        return $this;
    }
1274152
public function addRules(array $rules) : ValidatorInterface
    {
        if (!is_array($rules) || empty($rules)) {
            throw new ValidatorException(sprintf('Validator::addRules() expect array of rules, %s given.', \gettype($rules)));
        }

        foreach ($rules as $field => $rule) {
            $this->addRule($field, $rule);
        }

        return $this;
    }
1060820
final public function bindToValidation(array $bindings): self
    {
        $this->validationBindings = \array_merge($this->validationBindings, $bindings);

        return $this;
    }
493774
public function bindParam($parameter = null, & $value = null, $type = null, $maxLength = null, $driverData = null)
    {
        parent::bindParam($parameter, $value, $type);
        
        return $this;
    }
1280318
public function addRuleToAll(ValidatorRule $rule, $position = self::APPEND) {
    if ($position == self::APPEND) {
      foreach ($this->rules as $key => $NULL) {
        array_push($this->rules[$key],$rule);
      }
    }
    
    if ($position == self::PREPEND) {
      foreach ($this->rules as $key => $NULL) {
        array_unshift($this->rules[$key], $rule);
      }
    }
    
    if (is_numeric($position)) {
      foreach ($this->rules as $key => $NULL) {
        A::insert($this->rules[$key], $rule, (int) $position);
      }
    }
    
    throw new \Psc\Exception('unbekanter Parameter für position: '.Code::getInfo($position));
  }