/** * {@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(); }
/** * {@inheritdoc} */ public function isAllow(StateInterface $state, Graph $graph, $authorizationMask) { return parent::isAllow($state, $graph, $authorizationMask) && $state->getMask() < $this->getMask(); }
/** * {@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; }