Example #1
0
 /**
  * {@inheritdoc}
  */
 public function isAllowed(NodeInterface $from, NodeInterface $to)
 {
     foreach ($this->getTargets() as $namespace) {
         if ($this->namespaceContains($namespace, $to->getFQName())) {
             return EvaluationResult::denied($this, sprintf("%s has an attached DenyPolicy of namespace %s, preventing use of %s", $from->getFQName(), $namespace, $to->getFQName()));
         }
     }
     return EvaluationResult::undefined();
 }