Ejemplo n.º 1
0
 /**
  * Is the given restriciton object registered?
  * 
  * @static
  * 
  * @param Falcraft\Data\Types\Restrictions
  *      The restrictions possibly registered
  * 
  * @return bool True on success, False on failure
  * 
  */
 public static function isRestrictionObjectRegistered($restrictions)
 {
     if (self::$registry === null) {
         self::$registry = new Map();
         self::initRegsitry();
     }
     $values = self::$registry->getValues();
     foreach ($values as $value) {
         if (Restrictions::compare($restrictions, $value)) {
             return true;
         }
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * Detach conduit from everything
  * 
  * NOTE: you only detach yourself from the aggregate
  */
 public function unlink()
 {
     $listeners = $this->conduit->getValues();
     Types\RestrictedSet::mapInternal('detach', array($this), $listeners);
     $this->publishers->detachListener($this);
 }