{@inheritdoc}
@see \Oka\PaginationBundle\Converter\QueryExprConverter::apply()
494721
public function apply($dbDriver, $alias, $field, $exprValue, $namedParameter = null, &$value = null)
	{
		$matches = [];
		
		if (!preg_match(self::PATTERN, $exprValue, $matches)) {
			throw new BadQueryExprException(sprintf('The query expression converter "eq" does not support the following pattern "%s".', $exprValue));
		}
		
		$value = $matches[1];
		
		return $dbDriver === 'orm' ? 
				(new \Doctrine\ORM\Query\Expr())->eq($alias.'.'.$field, $namedParameter ?: ':'.$field) : 
				(new \Doctrine\MongoDB\Query\Expr())->field($field)->equals($value);
	}
823640
public function apply()
    {
        $records = $this->getDraftRecords();
        
        if ($ids = $this->getLiveIds()) {
            $records = $records->exclude('ID', $ids);
        }
        
        return $records;
    }
398070
protected function applySort()
    {
        $sort = $this->getActualSort();

        if ( ! $sort) return $this;

        $criteria = $this->getModelSortCriteria();

        if ( ! $criteria) return $this;

        $this->getModelRepository()->pushCriteria($criteria, CriteriaKey::ORDER);

        return $this;
    }
804938
public function apply(array $params)
    {
        $tags = [];
        foreach ($params as $key => $value) {
            $tags['/{' . $key . '}/'] = $value;
        }
        return preg_replace(array_keys($tags), array_values($tags), $this->getConfig('template'));
    }
445926
@Override
    public Object apply(Object value, Object... params) {

        return super.asString(value).replaceAll("[\n]", "<br />\n");
    }
1119345
protected function applyCriteria(QueryBuilder $queryBuilder, array $criteria = [])
    {
        foreach ($criteria as $property => $value) {
            $name = $this->getPropertyName($property);
            if (null === $value) {
                $queryBuilder->andWhere($queryBuilder->expr()->isNull($name));
            } elseif (is_array($value)) {
                $queryBuilder->andWhere($queryBuilder->expr()->in($name, $value));
            } elseif ('' !== $value) {
                $parameter = str_replace('.', '_', $property);
                $queryBuilder
                    ->andWhere($queryBuilder->expr()->eq($name, ':'.$parameter))
                    ->setParameter($parameter, $value)
                ;
            }
        }
    }
856680
protected function applyCriteria(QueryBuilder $queryBuilder, array $criteria = null)
    {
        if (null === $criteria) {
            return;
        }

        foreach ($criteria as $property => $value) {
            if (null === $value) {
                $queryBuilder
                    ->andWhere($queryBuilder->expr()->isNull($this->getPropertyName($property)));
            } elseif (!is_array($value)) {
                $queryBuilder
                    ->andWhere($queryBuilder->expr()->eq($this->getPropertyName($property), ':' . $property))
                    ->setParameter($property, $value);
            } else {
                $queryBuilder->andWhere($queryBuilder->expr()->in($this->getPropertyName($property), $value));
            }
        }
    }
118555
public function applyScopes()
    {
        if (! $this->scopes) {
            return $this;
        }

        $builder = $this;

        foreach ($builder->scopes as $identifier => $scope) {
            if (! isset($builder->scopes[$identifier])) {
                continue;
            }

            $builder->callScope(function (DynamoDbQueryBuilder $builder) use ($scope) {
                // If the scope is a Closure we will just go ahead and call the scope with the
                // builder instance. The "callScope" method will properly group the clauses
                // that are added to this query so "where" clauses maintain proper logic.
                if ($scope instanceof Closure) {
                    $scope($builder);
                }

                // If the scope is a scope object, we will call the apply method on this scope
                // passing in the builder and the model instance. After we run all of these
                // scopes we will return back the builder instance to the outside caller.
                if ($scope instanceof Scope) {
                    throw new NotSupportedException('Scope object is not yet supported');
                }
            });

            $builder->withoutGlobalScope($identifier);
        }

        return $builder;
    }
673796
public function apply(ModelCriteria $query)
    {
        $modifier = new Modifier($query);
        foreach ($this->request->getQueryParams() as $column => $value) {
            # Ignored params
            if (is_string($value) === false || in_array($column, $this->ignoredParams)) {
                continue;
            }
            $filter = new Filter($value);
            $modifier->filterBy($column, $filter->getValue(), $filter->getOperator());
        }
    }
564308
protected function applyScopes($query)
    {
        foreach ($this->scopes as $scope) {
            $scope->apply($query);
        }

        return $query;
    }
1277557
public function apply(Query $query) : Query
    {
        $method = is_array($this->value) ? 'in' : 'eq';

        return $query->where(
            (new QueryExpression())->{$method}(
                $this->field,
                [] === $this->value ? '' : $this->value,
                $query->getTypeMap()->type($this->field)
            )
        );
    }
1323550
public function apply(
        QueryBuilder $queryBuilder,
        QueryNameGeneratorInterface $queryNameGenerator,
        string $resourceClass,
        string $operationName = null
    ) {
        $request = $this->requestStack->getCurrentRequest();
        if (null === $request) {
            return;
        }
        $requestProperties = $this->extractProperties($request);
        if (!array_key_exists('order', $requestProperties)) {
            return;
        }

        /** @var array $orderProperties */
        $orderProperties = $requestProperties['order'];
        $this->doApply($queryBuilder, $orderProperties, $resourceClass, $operationName);
    }
1225511
public function apply()
    {
        if ($this->canApply()) {
            $node = $this->getSubject();
            $propertyName = $this->getPropertyName();
            $value = $this->nodePropertyConversionService->convert(
                $node->getNodeType(),
                $propertyName,
                $this->getValue(),
                $node->getContext()
            );

            // TODO: Make changing the node type a separated, specific/defined change operation.
            if ($propertyName === '_nodeType') {
                $nodeType = $this->nodeTypeManager->getNodeType($value);
                $node = $this->changeNodeType($node, $nodeType);
            } elseif ($propertyName{0} === '_') {
                ObjectAccess::setProperty($node, substr($propertyName, 1), $value);
            } else {
                $node->setProperty($propertyName, $value);
            }

            $this->updateWorkspaceInfo();

            $reloadIfChangedConfigurationPath = sprintf('properties.%s.ui.reloadIfChanged', $propertyName);
            if (!$this->getIsInline() && $node->getNodeType()->getConfiguration($reloadIfChangedConfigurationPath)) {
                if ($this->getNodeDomAddress() && $this->getNodeDomAddress()->getFusionPath()
                    && $node->getNodeType()->isOfType('Neos.Neos:Content')
                    && $node->getParent()->getNodeType()->isOfType('Neos.Neos:ContentCollection')
                ) {
                    $reloadContentOutOfBand = new ReloadContentOutOfBand();
                    $reloadContentOutOfBand->setNode($node);
                    $reloadContentOutOfBand->setNodeDomAddress($this->getNodeDomAddress());
                    $this->feedbackCollection->add($reloadContentOutOfBand);
                } else {
                    $this->reloadDocument($node);
                }
            }

            $reloadPageIfChangedConfigurationPath = sprintf('properties.%s.ui.reloadPageIfChanged', $propertyName);
            if (!$this->getIsInline() && $node->getNodeType()->getConfiguration($reloadPageIfChangedConfigurationPath)) {
                $this->reloadDocument($node);
            }

            // This might be needed to update node label and other things that we can calculate only on the server
            $updateNodeInfo = new UpdateNodeInfo();
            $updateNodeInfo->setNode($node);
            $this->feedbackCollection->add($updateNodeInfo);
        }
    }
575245
public function apply(QueryObjectInterface $query)
    {
        if (empty($this->fields)) {
            return $this;
        }
        
        $query->where(
            [
                $this->getQueryCondition() => [
                    ':pattern' => "%{$this->pattern}%"
                ]
            ]
        );
        return $this;
    }
42549
public function apply()
    {
        $fonts = $this->getOnFonts($this->config->getArrayCopy());
        $url = $this->fontsUrl($fonts);
        $this->enqueue($url);
    }
142504
public function apply()
    {
        $input = $this->grid->getInputProcessor()->getInput();
        $sort = null;
        if (isset($input['sort'])) {
            foreach ($input['sort'] as $field => $direction) {
                $sort = [$field, $direction];
                break;
            }
        }
        foreach ($this->grid->getConfig()->getColumns() as $column) {
            if ($sort) {
                if ($column->getName() === $sort[0]) {
                    $column->setSorting($sort[1]);
                } else {
                    $column->setSorting(null);
                }
            } else {
                if ($direction = $column->getSorting()) {
                    $sort = [$column->getName(), $direction];
                }
            }
        }
        if ($sort) {
            $this
                ->grid
                ->getConfig()
                ->getDataProvider()
                ->orderBy($sort[0], $sort[1]);
        }
    }
254644
private function applySelect() : void
    {
        $group = $this->query->clause('group');
        $group = array_filter($group);
        if (empty($group)) {
            return;
        }

        $this->query->select($group, true);
        $this->query->select([self::GROUP_BY_FIELD => $this->query->func()->count($group[0])]);
    }