Skip to content

ParsedPattern

Represents a parsed number pattern.

  • Full name: \CommerceGuys\Intl\Formatter\ParsedPattern
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Properties

positivePattern

The positive number pattern.

protected string $positivePattern

negativePattern

The negative number pattern.

protected string $negativePattern

groupingUsed

Whether grouping is used.

protected bool $groupingUsed

primaryGroupSize

The primary group size.

protected int $primaryGroupSize

secondaryGroupSize

The secondary group size.

protected int $secondaryGroupSize

Methods

__construct

Creates a new ParsedPattern instance.

public __construct(string $pattern): mixed

Parameters:

Parameter Type Description
$pattern string The raw pattern.

getPositivePattern

Gets the positive number pattern.

public getPositivePattern(): string

Used to format positive numbers.


getNegativePattern

Gets the negative number pattern.

public getNegativePattern(): string

Used to format negative numbers.


isGroupingUsed

Gets whether grouping is used.

public isGroupingUsed(): bool

Indicates that major digits should be grouped according to group sizes, right-to-left.


getPrimaryGroupSize

Gets the primary group size.

public getPrimaryGroupSize(): int|null

getSecondaryGroupSize

Gets the secondary group size.

public getSecondaryGroupSize(): int|null


Automatically generated on 2025-03-18