static public function getLocalClass($remoteClass) {

            $localClass = false;
            $cb = false;
            $localClass=(isset(self::$maps[$remoteClass]))?self::$maps[$remoteClass]:false;
            if (!$localClass && is_callable(self::$onGetLocalClass)) {
                $cb = true;
                $localClass = call_user_func(self::$onGetLocalClass,$remoteClass);
            }
            if (!$localClass) return false;
            if (!is_string($localClass) && $cb) {
                throw new Exception('Classname received from onGetLocalClass should be a string or return false. ' . gettype($localClass) . ' was returned');
            }
            if (!class_exists($localClass)) {
                throw new Exception('Class ' . $localClass . ' is not defined');
            }
            return $localClass;

        }