Register the given bindings with the container and prepare markers.

@param array<Binding> $bindings
495335
protected function registerBindings(array $bindings)
	{
		foreach($bindings as $binding)
		{
			$this->bindings[(string)$binding] = $binding;
				
			foreach($binding->getMarkers() as $marker)
			{
				$marker = get_class($marker);
		
				if(empty($this->markers[$marker]))
				{
					$this->markers[$marker] = new \SplObjectStorage();
				}
		
				$this->markers[$marker]->attach($binding);
			}
		}
	}
1244027
public function concatenate(array $bindings = [])
    {
        // Filter out empty query segments.
        $bindings = array_filter($bindings, function ($value) {
            return (string) $value !== '';
        });

        return implode('', $bindings);
    }
257530
public function registerPrefixes($prefixes)
    {
        if (!is_array($prefixes) && !$prefixes instanceof Traversable) {

            throw new Zend_Loader_Exception_InvalidArgumentException('Prefix pairs must be either an array or Traversable');
        }

        foreach ($prefixes as $prefix => $directory) {
            $this->registerPrefix($prefix, $directory);
        }
        return $this;
    }
323416
public function prepareBindings(array $bindings)
    {
        $grammar = $this->getQueryGrammar();

        $prepared = array();

        foreach ($bindings as $key => $binding)
        {
            // The bindings are collected in a little bit different way than
            // Eloquent, we will need the key name in order to know where to replace
            // the value using the Neo4j client.
            $value = $binding;

            // We need to get the array value of the binding
            // if it were mapped
            if (is_array($value))
            {
                // There are different ways to handle multiple
                // bindings vs. single bindings as values.
                $value = array_values($value);
            }

            // We need to transform all instances of the DateTime class into an actual
            // date string. Each query grammar maintains its own date string format
            // so we'll just ask the grammar for the format to get from the date.

            if ($value instanceof DateTime)
            {
                $binding = $value->format($grammar->getDateFormat());
            }

            $property = is_array($binding) ? key($binding) : $key;

            // We will set the binding key and value, then
            // we replace the binding property of the id (if found)
            // with a _nodeId instead since the client
            // will not accept replacing "id(n)" with a value
            // which have been previously processed by the grammar
            // to be _nodeId instead.
            if ( ! is_array($binding))
            {
                $binding = [$binding];
            }

            foreach ($binding as $property => $real)
            {
                // We should not pass any numeric key-value items since the Neo4j client expects
                // a JSON map parameters.
                if (is_numeric($property))
                {
                    $property = (! is_numeric($key)) ? $key : 'id';
                }

                if ($property == 'id') $property = $grammar->getIdReplacement($property);

                $prepared[$property] = $real;
            }
        }

        return $prepared;
    }
1298376
public function prepareBindingsForUpdate(array $bindings, array $values)
	{
		$index = 0;

		foreach ($values as $column => $value) {
			if ($this->isJsonSelector($column) && is_bool($value)) {
				unset($bindings[$index]);
			}

			$index++;
		}

		return $bindings;
	}
955720
protected function bindMethods(array $binds)
    {
        $self = $this;
        foreach ($binds as $eventName => $methodName) {
            $this->client->on(
                $eventName,
                function () use ($self, $methodName, $eventName) {
                    $self->{$methodName}(func_get_args(), $eventName);
                }
            );
        }
    }
628262
protected function initializeBinding(Binding $binding)
    {
        $binding->initialize($this->getBindingType($binding->getTypeName()));

        $bindingClass = get_class($binding);

        if (!isset($this->initializersByBindingClass[$bindingClass])) {
            $this->initializersByBindingClass[$bindingClass] = array();

            // Find out which initializers accept the binding
            foreach ($this->initializers as $initializer) {
                if ($initializer->acceptsBinding($bindingClass)) {
                    $this->initializersByBindingClass[$bindingClass][] = $initializer;
                }
            }
        }

        // Apply all initializers that we found
        foreach ($this->initializersByBindingClass[$bindingClass] as $initializer) {
            $initializer->initializeBinding($binding);
        }
    }
418735
private function setPrefixes( array $prefixes ) {
		foreach ( $prefixes as $prefix => $iri ) {
			$this->expressionValidator->validate( $prefix, ExpressionValidator::VALIDATE_PREFIX );
			$this->expressionValidator->validate( $iri, ExpressionValidator::VALIDATE_IRI );

			$this->prefixes[$prefix] = $iri;
		}

		$this->usageValidator->trackDefinedPrefixes( array_keys( $this->prefixes ) );
	}
131649
public function prepare($bindings= array (), $byValue= true, $cacheFlag= null) {
        $this->stmt= null;
        if ($this->construct() && $this->stmt= $this->xpdo->prepare($this->sql)) {
            $this->bind($bindings, $byValue, $cacheFlag);
        } else {
            $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, 'Could not construct or prepare query because it is invalid or could not connect: ' . $this->sql);
        }
        return $this->stmt;
    }
1334103
public function registerXPathNamespaces($namespaces)
    {
        // Convenience method to add multiple namespaces at once
        foreach ($namespaces as $prefix => $uri) {
            $this->registerXPathNamespace($prefix, $uri);
        }
    }
1243862
private function bindValues(array $values)
    {
        $this->bindedParameters = array();
        $this->bindedTypes = array();
        $this->bindedValues = array();

        foreach ($values as $parameter => $value) {
            if (is_int($parameter)) {
                $parameter++;
            }

            $this->bindValue($parameter, $value);
        }
    }
1080560
public function prepareBindings(array $bindings)
    {

        foreach ($bindings as $key => $value) {

            // Micro-optimization: check for scalar values before instances
            if (is_bool($value)) {
                $bindings[$key] = intval($value);
            } elseif (is_scalar($value)) {
                continue;
            } elseif ($value instanceof \DateTime) {
                // We need to transform all instances of the DateTime class into an actual
                // date string. Each query grammar maintains its own date string format
                // so we'll just ask the grammar for the format to get from the date.
                $bindings[$key] = $value->format($this->queryGrammar->getDateFormat());
            }
        }

        return $bindings;
    }
1212755
private function methods($methods): void
    {
        if (is_callable($methods)) {
            if ($methods instanceof Closure) {
                $this->options["methods"] = $methods->bindTo($this);
            } else {
                $this->options["methods"] = $methods;
            }
        } else {
            $this->options["methods"] = (array) $methods;
        }
    }
1151860
public function assertViewHasAll(array $bindings)
    {
        foreach ($bindings as $key => $value) {
            if (is_int($key)) {
                $this->assertViewHas($value);
            } else {
                $this->assertViewHas($key, $value);
            }
        }

        return $this;
    }
260525
public function setBindingKeys($bindingKeys)
    {
        if (is_array($bindingKeys) && !empty($bindingKeys)) {
            $n = 1;
            foreach ($bindingKeys as $bindingKey) {
                $key = 'bindingKey.' . $n;
                $this->setParameter($key, $bindingKey);
                $n += 1;
            }
        }
        return $this;
    }
198716
protected function registerCustomBindings(): void
    {
        $repositoryFactory = $this->app->make(IRepositoryFactory::class);

        foreach (config('laravel_repositories.bindings') as $className => $repository) {
            $repositoryFactory->register($className, $repository);
        }
    }
1083291
public function mergeWheres($wheres, $bindings)
    {
        $this->wheres = array_merge((array) $this->wheres, (array) $wheres);

        $this->bindings['where'] = array_merge_recursive($this->bindings['where'], (array) $bindings);
    }