/
ConfiguratorInterface.php
37 lines (33 loc) · 1.11 KB
/
ConfiguratorInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Concrete\Core\Service\Configuration;
use Concrete\Core\Service\Rule\RuleInterface;
interface ConfiguratorInterface
{
/**
* Checks if a configuration contains a rule.
*
* @param string $configuration The whole configuration.
* @param RuleInterface $rule The rule to be checked.
*
* @return bool
*/
public function hasRule($configuration, RuleInterface $rule);
/**
* Adds a rule to the configuration (if not already there).
*
* @param string $configuration The whole configuration.
* @param RuleInterface $rule The rule to be added to the configuration.
*
* @return string Returns the modified configuration.
*/
public function addRule($configuration, RuleInterface $rule);
/**
* Removes a rule from the configuration (if it's there).
*
* @param string $configuration The whole configuration.
* @param RuleInterface $rule The rule to be removed from the configuration.
*
* @return string Returns the modified configuration.
*/
public function removeRule($configuration, RuleInterface $rule);
}