for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the jquery-querybuilder-bundle package.
*
* (c) 2019 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Bundle\JQuery\QueryBuilderBundle\Decorator\Operator;
use WBW\Bundle\JQuery\QueryBuilderBundle\API\QueryBuilderRuleInterface;
use WBW\Bundle\JQuery\QueryBuilderBundle\Decorator\Type\ArrayQueryBuilderType;
/**
* Not in QueryBuilder operator.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Bundle\JQuery\QueryBuilderBundle\Decorator\Operator
class NotInQueryBuilderOperator extends AbstractQueryBuilderOperator {
* Constructor.
public function __construct() {
parent::__construct(self::OPERATOR_NOT_IN);
}
* {@inheritDoc}
public function toSql(QueryBuilderRuleInterface $rule, bool $wrap = false): string {
$qbt = new ArrayQueryBuilderType();
$tmp = $qbt->toSql($rule, true);
$sql = [
parent::toSql($rule, $wrap),
"(" . str_replace("{{implode}}", ", ", $tmp) . ")",
];
return implode(" ", $sql);