public static function factory($classId)
    {
        $className = static::getClassNameFromClassId($classId);

        if (!class_exists($className)) {
            self::sendPlainHeader();
            throw new Exception(static::getInvalidClassIdExceptionMessage($classId));
        }

        return new $className;
    }
public static function factory($classId)
    {
        $className = static::getClassNameFromClassId($classId);

        if (!class_exists($className)) {
            self::sendPlainHeader();
            throw new Exception(static::getInvalidClassIdExceptionMessage($classId));
        }

        return new $className;
    }
public static function factory ( $ classId ) { $ className = static :: getClassNameFromClassId ( $ classId ) ; if ( ! class_exists ( $ className ) ) { self :: sendPlainHeader ( ) ; throw new Exception ( static :: getInvalidClassIdExceptionMessage ( $ classId ) ) ; } return new $ className ; }
Creates a new instance of a class using a string ID.

@param string $classId The ID of the class.
@return \Piwik\DataTable\Renderer
@throws Exception if $classId is invalid.
Creates a new instance of a class using a string ID .