private function getRoutingRuleMap() { if ($this->routingMap === null) { $map = array(); $routing = $this->getParam('routing', array()); foreach ($routing as $route) { $phids = $route['phids']; if ($phids === null) { $phids = array('default'); } foreach ($phids as $phid) { $new_rule = $route['routingRule']; $current_rule = idx($map, $phid); if ($current_rule === null) { $is_stronger = true; } else { $is_stronger = PhabricatorMailRoutingRule::isStrongerThan($new_rule, $current_rule); } if ($is_stronger) { $map[$phid] = array('rule' => $new_rule, 'reason' => $route['reasonPHID']); } } } $this->routingMap = $map; } return $this->routingMap; }