protected static function updateMap($class, $origin)
    {
        if (is_writable(self::$mapfile) ||
            is_writable(dirname(self::$mapfile))) {
            self::$map[$class] = $origin;
            file_put_contents(
                self::$mapfile,
                '<'."?php\n"
                . "// Autoload auto-generated classmap\n"
                . "return " . var_export(self::$map, true) . ';',
                LOCK_EX
            );
        }
    }