1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\DataDefinition\Palette\Condition\Palette;
14:
15: use DcGeneral\Data\ModelInterface;
16: use DcGeneral\Data\PropertyValueBag;
17: use DcGeneral\DataDefinition\ConditionInterface;
18:
19: /**
20: * A condition define when a palette is used or not.
21: */
22: interface PaletteConditionInterface extends ConditionInterface
23: {
24: /**
25: * Calculate how "strong" (aka "count of matches") this condition match the model and input parameters.
26: *
27: * If a value is present in the input parameter, that one overrides any existing value in the model.
28: *
29: * @param ModelInterface|null $model If given, selectors will be evaluated depending on the model.
30: *
31: * @param PropertyValueBag $input If given, selectors will be evaluated depending on the input data.
32: *
33: * @return bool
34: */
35: public function getMatchCount(ModelInterface $model = null, PropertyValueBag $input = null);
36:
37: /**
38: * Create a deep clone of the condition.
39: *
40: * @return void
41: */
42: public function __clone();
43: }
44: