-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Ibexa\CoreSearch\CriterionMapper; | ||
|
||
use Ibexa\Contracts\CoreSearch\Persistence\CriterionMapper\AbstractFieldCriterionMapper; | ||
use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\CriterionInterface; | ||
use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion; | ||
|
||
/** | ||
* @template-extends \Ibexa\Contracts\CoreSearch\Persistence\CriterionMapper\AbstractFieldCriterionMapper< | ||
* \Ibexa\Contracts\CoreSearch\Values\Query\Criterion\FieldValueCriterion | ||
* > | ||
*/ | ||
final class FieldValueCriterionMapper extends AbstractFieldCriterionMapper | ||
{ | ||
public function canHandle(CriterionInterface $criterion): bool | ||
{ | ||
return $criterion instanceof FieldValueCriterion; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Ibexa\CoreSearch\CriterionMapper; | ||
|
||
use Doctrine\Common\Collections\Expr\CompositeExpression; | ||
use Ibexa\Contracts\CoreSearch\Persistence\CriterionMapper\AbstractCompositeCriterionMapper; | ||
use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\LogicalAnd; | ||
|
||
final class LogicalAndCriterionMapper extends AbstractCompositeCriterionMapper | ||
{ | ||
protected function getHandledClass(): string | ||
{ | ||
return LogicalAnd::class; | ||
} | ||
|
||
protected function getType(): string | ||
{ | ||
return CompositeExpression::TYPE_AND; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Ibexa\CoreSearch\CriterionMapper; | ||
|
||
use Doctrine\Common\Collections\Expr\CompositeExpression; | ||
use Ibexa\Contracts\CoreSearch\Persistence\CriterionMapper\AbstractCompositeCriterionMapper; | ||
use Ibexa\Contracts\CoreSearch\Values\Query\Criterion\LogicalOr; | ||
|
||
final class LogicalOrCriterionMapper extends AbstractCompositeCriterionMapper | ||
{ | ||
protected function getHandledClass(): string | ||
{ | ||
return LogicalOr::class; | ||
} | ||
|
||
protected function getType(): string | ||
{ | ||
return CompositeExpression::TYPE_OR; | ||
} | ||
} |