1 | <?php |
||
10 | abstract class VoterAbstract implements VoterInterface { |
||
11 | |||
12 | /** |
||
13 | * @var \SplObjectStorage|\Vivait\Voter\Model\ConditionInterface[] |
||
14 | */ |
||
15 | protected $conditions; |
||
16 | |||
17 | /** |
||
18 | * @var LoggerInterface |
||
19 | */ |
||
20 | protected $logger; |
||
21 | |||
22 | public function __construct(array $conditions = array(), LoggerInterface $logger = null) |
||
33 | |||
34 | /** |
||
35 | * @param array $conditions |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function addConditions(array $conditions) |
||
46 | |||
47 | /** |
||
48 | * @param ConditionInterface $condition |
||
49 | * @return $this |
||
50 | */ |
||
51 | public function addCondition(ConditionInterface $condition) |
||
57 | |||
58 | /** |
||
59 | * @return \SplObjectStorage|\Vivait\Voter\Model\ConditionInterface[] |
||
60 | */ |
||
61 | public function getConditions() |
||
65 | |||
66 | /** |
||
67 | * @param ConditionInterface $condition |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function removeCondition(ConditionInterface $condition) |
||
76 | |||
77 | } |
||
78 |