Prepare a Query with a Specification.

@param Filter|QueryModifier $specification
@param ResultModifier|null  $modifier

@return Query
970536
public function getQuery($specification, ResultModifier $modifier = null)
    {
        $query = $this->getQueryBuilder($specification)->getQuery();

        if (null !== $modifier) {
            $modifier->modify($query);
        }

        return $query;
    }
1338515
final public function whereSatisfies(ISpecification $specification)
    {
        $specification->verifyOfClass($this->class->getClassName());

        $this->append($specification->getCondition());

        return $this;
    }
351353
protected String getQueryModifier() {

        String queryModifier = parseOptionalStringValue(m_configObject, JSON_KEY_QUERY_MODIFIER);
        return (null == queryModifier) && (null != m_baseConfig)
        ? m_baseConfig.getGeneralConfig().getQueryModifier()
        : queryModifier;
    }
301756
public function addModifier($modifier)
	{
		if (!in_array($modifier, $this->modifiers))
		{
			array_push($this->modifiers, trim($modifier));
		}

		return $this;
	}
1357612
public function retry_modify_request(callable $decider, callable $requestModifier, callable $delay = null)
    {
        return function (callable $handler) use ($decider, $requestModifier, $delay) {
            return new RetryModifyRequestMiddleware($decider, $requestModifier, $handler, $delay);
        };
    }
497320
public function addFieldValueFactorFunction($field, $factor, $modifier = 'none', BuilderInterface $query = null)
    {
        $function = [
            'field_value_factor' => [
                'field' => $field,
                'factor' => $factor,
                'modifier' => $modifier,
            ],
        ];

        $this->applyFilter($function, $query);

        $this->functions[] = $function;

        return $this;
    }
213720
public static <T extends Tree> Matcher<T> hasModifier(final Modifier modifier) {
    return new Matcher<T>() {
      @Override
      public boolean matches(T tree, VisitorState state) {
        Symbol sym = ASTHelpers.getSymbol(tree);
        return sym != null && sym.getModifiers().contains(modifier);
      }
    };
  }
594717
public function setModifier(EventManagerAwareInterface $modifier)
    {
        $this->modifier = $modifier;
        foreach ($this->buildItems as $buildItem) {
            if ($buildItem instanceof ModifiableInterface) {
                $buildItem->setModifier($modifier);
            }
        }
        
        return $this;
    }
112738
public void addModifier(String modifier) {
		if (!Strings.isEmpty(modifier)) {
			getSarlConstructor().getModifiers().add(modifier);
		}
	}
1253229
function register_modifier($modifier, $modifier_impl)
	{
		$this->_plugins['modifier'][$modifier] =
		array($modifier_impl, null, null, false);
	}
1135544
public function getModifier($identifier)
    {
        $modifiers = $this->getModifiers();
        return isset($modifiers[$identifier]) ? $modifiers[$identifier] : null;
    }
343647
public function mod($modulus)
    {
        $this->number = bcmod($this->number, static::validatePositiveInteger($modulus));

        return $this;
    }
920700
protected function processArray($modifier, array &$values)
	{
		foreach ($values as &$item) {
			$item = $this->processModifier($modifier, $item);
		}
	}
1263312
private function doAndNotPrefixSingleTerm($term, $modifier)
    {
        // already modifier there?
        $last = substr($term, -1);
        if ($last == '~' || $last == '*') {
            // clean from term, override modifier from client
            $modifier = $last;
            $term = substr($term, 0, -1);
        }

        return sprintf(
            '(%s OR %s%s)',
            $term,
            $term,
            $modifier
        );
    }
1289259
public function hasModifier($modifier)
    {
        foreach ($this->visibility as $visibility) {
            if ($visibility == $modifier) {
                return true;
            }
        }

        return false;
    }
518920
protected function getModificator()
	{
		if ( $this->modificator ) {
			list($modificator_name, $modificator_value) = each($this->modificator);
		}
		else {
			$modificator_name = $modificator_value = null;
		}

		return array($modificator_name, $modificator_value);
	}
998013
private function processStringTransformers( $string, Modifier $modifier )
    {

        // there can be multiple transformers are separated by |
        foreach( explode( '|', $string ) as $fragment ) {

            switch( true ) {

                case $fragment === 'null':

                    $modifier->add( 'pre', '\Bond\nullify' );
                    break;

                case substr( $fragment, 0, 4 ) === 'cast':

                    // extract type type from a modifier of the type cast(int), cast(text)
                    // default to the passed type if that doesn't work
                    $castTo = substr( $fragment, 5, -1 ) ?: $modifier->type;
                    // $castTo = $modifier->quoteInterface->quoteIdent( $castTo );

                    $modifier->add( 'post', $modifier->generateCastClosure( $castTo ) );
                    break;

                default:

                    throw new UnknownQueryModifier( $modifier );

            }

        }

    }