TextDirection

Forced paragraph direction accepted by Bidi. The backing value is the normalized direction: '' (auto detection), 'R' (force right-to-left) or 'L' (force left-to-right).

Namespace: Com\Tecnick\Unicode

Backing type: string

File: TextDirection.php line 36

Forced paragraph direction accepted by Bidi. The backing value is the normalized direction: ’’ (auto detection), ‘R’ (force right-to-left) or ‘L’ (force left-to-right).

Tags

Cases

Auto

File: TextDirection.php line 38

Rtl

File: TextDirection.php line 40

Ltr

File: TextDirection.php line 42

Methods

fromLoose()

File: TextDirection.php line 53

public static fromLoose(string|self $value) : self

Accepts an enum instance, returned unchanged, or a string: the empty string means auto, otherwise the first character (case-insensitive) selects the direction and anything that is not R or L falls back to auto (never throws).

Parameters

  • $value : string|self: Forced direction identifier or enum case.

Return values

self