public function contains($key) { $map = $this->flattenPriorities(); return isset($map[$key]) || array_key_exists($key, $map); }