SwatDB/SwatDBClassMap.php
public static function get($from_class_name)
    {
        $to_class_name = $from_class_name;

        while (array_key_exists($from_class_name, self::$map)) {
            $to_class_name = self::$map[$from_class_name];

            if (!is_subclass_of($to_class_name, $from_class_name)) {
                throw new SwatInvalidClassException(
                    sprintf(
                        'Invalid ' .
                            'class-mapping detected. %s is not a subclass of %s.',
                        $to_class_name,
                        $from_class_name
                    )
                );
            }

            $from_class_name = $to_class_name;
        }

        return $to_class_name;
    }
public static function get($from_class_name)
    {
        $to_class_name = $from_class_name;

        while (array_key_exists($from_class_name, self::$map)) {
            $to_class_name = self::$map[$from_class_name];

            if (!is_subclass_of($to_class_name, $from_class_name)) {
                throw new SwatInvalidClassException(
                    sprintf(
                        'Invalid ' .
                            'class-mapping detected. %s is not a subclass of %s.',
                        $to_class_name,
                        $from_class_name
                    )
                );
            }

            $from_class_name = $to_class_name;
        }

        return $to_class_name;
    }
public static function get ( $ from_class_name ) { $ to_class_name = $ from_class_name ; while ( array_key_exists ( $ from_class_name , self :: $ map ) ) { $ to_class_name = self :: $ map [ $ from_class_name ] ; if ( ! is_subclass_of ( $ to_class_name , $ from_class_name ) ) { throw new SwatInvalidClassException ( sprintf ( 'Invalid ' . 'class-mapping detected. %s is not a subclass of %s.' , $ to_class_name , $ from_class_name ) ) ; } $ from_class_name = $ to_class_name ; } return $ to_class_name ; }
Resolves a class name from the class map

@param string $from_class_name the name of the class to resolve.

@return string the resolved class name. If no class mapping exists for
for the given class name, the same class name is
returned.

@throws SwatInvalidClassException if a mapped class is not a subclass of
its original class.
Resolves a class name from the class map