Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function isAllow(StateInterface $state, Graph $graph, $authorizationMask)
 {
     $acceptedMasks = 0;
     foreach ($this->stateKeys as $stateKey) {
         $acceptedMasks |= $graph->getState($stateKey)->getMask();
     }
     return parent::isAllow($state, $graph, $authorizationMask) && ($state->getMask() & $acceptedMasks) === $state->getMask();
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function isAllow(StateInterface $state, Graph $graph, $authorizationMask)
 {
     return parent::isAllow($state, $graph, $authorizationMask) && $state->getMask() < $this->getMask();
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function isAllow(StateInterface $state, Graph $graph, $authorizationMask)
 {
     $untilMask = $graph->getState($this->untilKey)->getMask();
     return parent::isAllow($state, $graph, $authorizationMask) && $this->getMask() < $state->getMask() && $state->getMask() <= $untilMask;
 }