Registers a data binding.

@param string     $prop    The name of the bound property.
@param Expression $bindExp The binding expression.
550343
function addBinding ($prop, Expression $bindExp)
  {
    if (!isset($this->bindings))
      $this->bindings = [];
    $this->bindings[$prop] = $bindExp;
  }
665214
public function bind(PbjxEvent $pbjxEvent): void
    {
        $request = $pbjxEvent->getMessage();
        $query = trim((string)$request->get('q'));
        if (empty($query)) {
            return;
        }

        $parsedQuery = $this->queryParser->parse($query);
        $request
            ->set('q', $query)
            ->addToSet('fields_used', $parsedQuery->getFieldsUsed())
            ->set('parsed_query_json', json_encode($parsedQuery));
    }
240254
public void setExtProperty(String propName, String propValue) {
        if (m_extProperties == null) {
            m_extProperties = new HashMap<String, String>();
        }
        m_extProperties.put(propName, propValue);

    }
66477
function bindModel(proc, model) {
  const actualModel = model || {};
  proc.model = actualModel;
  proc.logic.model = actualModel;

  if (!actualModel.__proc) {
    Object.defineProperty(actualModel, '__proc', {
      value: proc,
      enumerable: false,
      configurable: true
    });
  }
}
207700
public function setBind($bind, $merge = true)
    {
        $this->_bind = $merge ? array_merge($this->_bind, $bind) : $bind;

        return $this;
    }
349250
protected function bindParam($bind)
    {
        foreach ($bind as $key => $val) {
            $param = is_numeric($key) ? $key + 1 : ':' . $key;

            if (is_array($val)) {
                array_unshift($val, $param);
                $result = call_user_func_array([$this->PDOStatement, 'bindParam'], $val);
            } else {
                $result = $this->PDOStatement->bindValue($param, $val);
            }

            if (!$result) {
                $param = array_shift($val);

                throw new BindParamException(
                    "Error occurred  when binding parameters '{$param}'",
                    $this->config,
                    $this->getLastsql(),
                    $bind
                );
            }
        }
    }
707592
public function configure(Binder $binder, string $projectPath = null)
    {
        if ($this->enableSessionCaching) {
            $binder->bind(AuthenticationProvider::class)
                   ->to(CachingAuthenticationProvider::class);
            $binder->bind(AuthenticationProvider::class)
               ->named('original')
               ->to($this->authenticationProvider);
            if (null !== $this->authorizationProvider) {
                $binder->bind(AuthorizationProvider::class)
                   ->to(CachingAuthorizationProvider::class);
                $binder->bind(AuthorizationProvider::class)
                       ->named('original')
                       ->to($this->authorizationProvider);
            }
        } else {
            $binder->bind(AuthenticationProvider::class)
               ->to($this->authenticationProvider);
            if (null !== $this->authorizationProvider) {
                $binder->bind(AuthorizationProvider::class)
                       ->to($this->authorizationProvider);
            }
        }

        if (null !== $this->tokenStore) {
            $binder->bind(AuthenticationProvider::class)
                   ->named('stubbles.webapp.auth.token.loginProvider')
                   ->to($this->loginProvider);
            $binder->bind(TokenStore::class)
                   ->to($this->tokenStore);
        }
    }
525828
protected function parseRegexp($regexp)
	{
		$this->captures = [['name' => null, 'expr' => null]];
		$regexpInfo = $this->getRegexpInfo($regexp);
		$this->delimiter = $regexpInfo['delimiter'];
		$this->modifiers = str_replace('D', '', $regexpInfo['modifiers']);
		foreach ($regexpInfo['tokens'] as $token)
		{
			if ($token['type'] !== 'capturingSubpatternStart')
			{
				continue;
			}
			$this->captures[] = [
				'pos'    => $token['pos'],
				'name'   => (isset($token['name'])) ? $token['name'] : null,
				'expr'   => $token['content']
			];
		}
	}
856615
protected function databind ()
  {
    if (isset($this->bindings))
      foreach ($this->bindings as $attrName => $bindExp) {
        $value = $this->evalBinding ($bindExp);
        if (is_object ($value))
          $this->props->$attrName = $value;
        else $this->props->set ($attrName, $value);
      }
  }
471434
private function bind($key, $value, $bindDataType)
    {
        $this->sqlQuery->bindValue($key, $value, $bindDataType);
    }
1237899
protected static function RegisterDaftObjectTypeFromTypeAndProps(
        string $maybe,
        string $prop,
        string ...$props
    ) : string {
        array_unshift($props, $prop);

        $args = static::TypeAndGetterAndSetterClosureWithProps($maybe, ...$props);

        /**
        * @var array<int, string>
        */
        $props = array_slice($args, 3);

        static::RegisterType($args[self::INT_ARRAY_INDEX_TYPE], $args[self::INT_ARRAY_INDEX_GETTER], $args[self::INT_ARRAY_INDEX_SETTER], ...$props);

        self::MaybeRegisterAdditionalTypes($args[self::INT_ARRAY_INDEX_TYPE]);

        return $maybe;
    }
83402
public function bind(array $payload=null)
    {
        $bound = false;
        $this->_boundEntities = array();

        if (!is_null($payload)
            && isset($payload[$this->getName()])
            && $this->validateSynchronizerToken($payload)
        ) {
            $this->logger->debug('start binding form', array('name' => $this->getName(), 'payload' => $payload));

            $propertyMapper = new PropertyMapper();

            /**
             * @var $entityContainer    \Naucon\Form\Mapper\EntityContainerInterface
             */
            if ($this->getEntityContainerMap()->count() > 0) {
                if (!is_null($entityContainer = current($this->getEntityContainerMap()->getAll()))) {
                    $propertyMapper->mapFormToData($entityContainer->getEntity(), $payload[$this->getName()]);
                    $this->addBoundEntity($entityContainer->getEntity());

                    // postbind hook
                    $this->logger->debug('invoke form postbind hook', array('name' => $this->getName(), 'entity' => $entityContainer->getName()));
                    $entityContainer->invokeHook('postbindHook');

                    $bound = true;
                }
            }
        }


        $this->setBound($bound);

        $this->logger->debug('execute post binding form', array('name' => $this->getName()));
        $this->postBind();

        if ($this->isBound()) {
            $this->logger->debug('finished binding form successful', array('name' => $this->getName()));
        } else {
            $this->logger->debug('finished binding form failed', array('name' => $this->getName()));
        }
        return $this->isBound();
    }
457754
public function bind(string $field, $value, string $prefix = ''): string
    {
    	if ($this->bindings === null) {
    		$this->bindings = new Bindings();
	    }

    	$parameter = $prefix . $field;
    	$bindName = $this->bindings->makeAndSet($parameter, $value);
        return $bindName;
    }
854949
public function assignExisting ( $propName, $propValue ) {
        if (is_bool( $this->$propName )) {
            if (strtolower( $propValue ) == 'false') {
                $propValue = false;
            }
            $this->$propName = (bool) $propValue;
        } elseif (is_int( $this->$propName )) {
            $this->$propName = (int) $propValue;
        } elseif (is_bool( $this->$propName )) {
            $this->$propName = (bool) $propValue;
        } elseif ($this->$propName instanceof Timer || $this->$propName == MapConst::TIMER) {
            $this->$propName = new Timer( $propValue );
        } else {
            $this->$propName = $propValue;
        }
    }
1026321
protected function registerBindings()
    {
        // TODO: Change to bind the implementation to the interface instead.
        $this->app->bind(CorsService::class, function () {
            return new CorsService(config(self::CONFIG_KEY));
        });

        $this->app->alias(CorsService::class, CorsServiceContract::class);
    }
931112
public function configure(Binder $binder, string $projectPath = null)
    {
        $args = $this->parseArgs();
        $binder->bindConstant('argv')
               ->to($args);
        foreach ($args as $name => $value) {
            if (substr($name, 0, 5) !== 'argv.') {
                $name = 'argv.' . $name;
            }

            $binder->bindConstant($name)
                   ->to($value);
        }

        $request = new ConsoleRequest($args, $_SERVER);
        $binder->bind(Request::class)
               ->toInstance($request);
        $binder->bind(ConsoleRequest::class)
               ->toInstance($request);
        if (null !== $this->userInput) {
            $binder->bind($this->userInput)
                   ->toProviderClass(UserInputProvider::class)
                   ->asSingleton();
            $binder->bind($this->userInput)
                   ->named('stubbles.console.input.instance')
                   ->to($this->userInput);
            $binder->bindConstant('stubbles.console.input.class')
                   ->to($this->userInput);
        }
    }
458592
public function bind($name = null, $password = null)
    {
        if (strlen(trim($name)) > 0) {
            $password = (null === $password)?'':$password;
            $this->connection->bind($name, $password);
            $this->isBound = true;
            return;
        }

        if ($this->configuration['bind_anonymous']) {
            $this->connection->bind();
            $this->isBound = true;
            return;
        }

        $this->connection->bind(
            $this->configuration['bind_dn'],
            $this->configuration['bind_password']
        );
        $this->isBound = true;
    }