Table of contents
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
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-unicode
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