PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` _source = $source; $this->addIds($ids); return; } /** * Adds acceptable ID (or reset). */ public function addIds(array $ids) { foreach ($ids as $id) { $this->_callables[$id] = []; } } /** * Attaches a callable to a listenable component. */ public function attach(string $listenerId, $callable): self { if (false === $this->listenerExists($listenerId)) { throw new EventException('Cannot listen %s because it is not defined.', 0, $listenerId); } $callable = Xcallable::from($callable); $this->_callables[$listenerId][$callable->getHash()] = $callable; return $this; } /** * Detaches a callable from a listenable component. */ public function detach(string $listenerId, $callable): self { unset($this->_callables[$listenerId][Xcallable::from($callable)->getHash()]); return $this; } /** * Detaches all callables from a listenable component. */ public function detachAll(string $listenerId): self { unset($this->_callables[$listenerId]); return $this; } /** * Checks if a listener exists. */ public function listenerExists(string $listenerId): bool { return \array_key_exists($listenerId, $this->_callables); } /** * Sends/fires a bucket to a listener. */ public function fire(string $listenerId, EventBucket $data): array { if (false === $this->listenerExists($listenerId)) { throw new EventException('Cannot fire on %s because it is not defined.', 1, $listenerId); } $data->setSource($this->_source); $out = []; foreach ($this->_callables[$listenerId] as $callable) { $out[] = $callable($data); } return $out; } }