public static function getRenderer( $renderer, ezpContent $content, ezpRestMvcController $controller )
    {
        // If no content renderer has been given, we fall back to built-in 'xhtml' renderer.
        // Note: empty string is not a valid input.
        if ( empty( $renderer ) )
        {
            $renderer = self::DEFAULT_RENDERER;
        }

        if ( !( self::$renderer instanceof ezpRestContentProviderInterface ) )
        {
            self::$renderer = self::createRenderer( $renderer, $content, $controller );
        }

        return self::$renderer;
    }