public static function add($extension, $type = null) { if (is_array($extension)) { self::$map = array_merge(self::$map, $extension); } elseif ($type === null) { throw new Error_IllegalArgument(); } else { self::$map[$extension] = $type; } }