public static function create($type, $value, $extra = null)
    {
        switch (strtolower($type)) {
            case 'int':
            case 'integer':
                return self::createInt($value);
            case 'float':
            case 'double':
                return self::createFloat($value);
            case 'string':
                return self::createString($value);
            case 'bool':
            case 'boolean':
                return self::createBool($value);
            case 'digit':
                return self::createDigit($value);
            case 'natural':
                return self::createNatural($value);
            case 'whole':
                return self::createWhole($value);
            case 'complex':
                return self::createComplex($value, $extra);
            case 'rational':
                return self::createRational($value, $extra);
            default:
                throw new InvalidTypeException(strtolower($type));
        }
    }