Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\API\Repository\Values\Content\Query\Criterion;
8
9 use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
10 use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications;
11
16 class MoreLikeThis extends Criterion
17 {
18 const CONTENT = 1;
19 const TEXT = 2;
20 const URL = 3;
21
27 protected $type;
28
37 public function __construct($type, $value)
38 {
39 $this->type = $type;
40
41 parent::__construct(null, null, $value);
42 }
43
44 public function getSpecifications()
45 {
46 return [
47 new Specifications(Operator::EQ, Specifications::FORMAT_SINGLE),
48 ];
49 }
50
54 public static function createFromQueryBuilder($target, $operator, $value)
55 {
56 @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 7.2 and will be removed in 8.0.', E_USER_DEPRECATED);
57
58 return new self($value);
59 }
60 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis
A more like this criterion is matched by content which contains similar terms found in the given cont...
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:17
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\$type
$type
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:27
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\getSpecifications
getSpecifications()
Criterion description function.
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:44
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\createFromQueryBuilder
static createFromQueryBuilder($target, $operator, $value)
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:54
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\TEXT
const TEXT
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:19
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\CONTENT
const CONTENT
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:18
eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis\__construct
__construct($type, $value)
Creates a new more like this criterion.
Definition: API/Repository/Values/Content/Query/Criterion/MoreLikeThis.php:37
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications
This class is used by Criteria to describe which operators they support.
Definition: Specifications.php:15
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_SINGLE
const FORMAT_SINGLE
Criterion input type description constants.
Definition: Specifications.php:19
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\EQ
const EQ
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:16
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion.php:15
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$target
$target
Definition: API/Repository/Values/Content/Query/Criterion.php:35
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$operator
$operator
Definition: API/Repository/Values/Content/Query/Criterion.php:21
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$value
$value
Definition: API/Repository/Values/Content/Query/Criterion.php:28
eZ\Publish\API\Repository\Values\URL\URL
Definition: API/Repository/Values/URL/URL.php:12
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion/Ancestor.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.