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

API/Repository/Values/Content/Query/Criterion/DateMetadata.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 use InvalidArgumentException;
12
31 class DateMetadata extends Criterion
32 {
36 public const MODIFIED = 'modified';
37
41 public const CREATED = 'created';
42
52 public function __construct($target, $operator, $value)
53 {
54 if ($target != self::MODIFIED && $target != self::CREATED) {
55 throw new InvalidArgumentException("Unknown DateMetadata $target");
56 }
57 parent::__construct($target, $operator, $value);
58 }
59
60 public function getSpecifications()
61 {
62 return [
63 new Specifications(Operator::EQ, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER),
64 new Specifications(Operator::GT, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER),
65 new Specifications(Operator::GTE, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER),
66 new Specifications(Operator::LT, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER),
67 new Specifications(Operator::LTE, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER),
68 new Specifications(Operator::IN, Specifications::FORMAT_ARRAY, Specifications::TYPE_INTEGER),
69 new Specifications(Operator::BETWEEN, Specifications::FORMAT_ARRAY, Specifications::TYPE_INTEGER, 2),
70 ];
71 }
72 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata
A criterion that matches content based on one of the date metadata (created or modified).
Definition: API/Repository/Values/Content/Query/Criterion/DateMetadata.php:32
eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata\__construct
__construct($target, $operator, $value)
Creates a new DateMetadata criterion on $metadata.
Definition: API/Repository/Values/Content/Query/Criterion/DateMetadata.php:52
eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata\CREATED
const CREATED
DateMetadata target: creation date.
Definition: API/Repository/Values/Content/Query/Criterion/DateMetadata.php:41
eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata\MODIFIED
const MODIFIED
DateMetadata target: modification date.
Definition: API/Repository/Values/Content/Query/Criterion/DateMetadata.php:36
eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata\getSpecifications
getSpecifications()
Criterion description function.
Definition: API/Repository/Values/Content/Query/Criterion/DateMetadata.php:60
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_ARRAY
const FORMAT_ARRAY
Definition: Specifications.php:20
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_INTEGER
const TYPE_INTEGER
Criterion input value type description constants.
Definition: Specifications.php:26
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\LT
const LT
Definition: API/Repository/Values/Content/Query/Criterion/Operator.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\Operator\LTE
const LTE
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:20
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\GT
const GT
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:17
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\IN
const IN
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:21
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\BETWEEN
const BETWEEN
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:22
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\GTE
const GTE
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:18
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\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+.