Esempio n. 1
0
 /**
  * Reroutes notifications from one service name to another.
  *
  * This is especially used when a notification was referring to its target by an alias and the alias's target
  * has just become known to the container.
  * 
  * @param  string $from Original notifications target.
  * @param  string $to   New notifications target.
  */
 public function rerouteNotifications($from, $to)
 {
     if (!isset($this->notifications[$from])) {
         return;
     }
     // $to might also be an alias, so lets dig deeper
     $to = $this->container->resolveServiceName($to);
     foreach ($this->notifications[$from] as $notification) {
         $this->notifications[$to][] = $notification;
     }
 }