Com\Tecnick\Unicode\Bidi
Tags
Table of Contents
- $arabic : bool
- True if the string contains arabic characters
- $bidichrarr : array<string|int, mixed>
- Array of processed UTF-8 chars
- $bidiordarr : array<string|int, mixed>
- Array of processed UTF-8 codepoints
- $bidistr : string
- Processed string
- $chardata : array<string|int, mixed>
- Array of character data
- $chrarr : array<string|int, mixed>
- Array of UTF-8 chars
- $conv : Convert
- Convert object
- $forcertl : bool
- If true force processign the string in RTL mode
- $ordarr : array<string|int, mixed>
- Array of UTF-8 codepoints
- $shaping : bool
- If true enable shaping
- $str : string
- String to process
- __construct() : mixed
- Reverse the RLT substrings using the Bidirectional Algorithm http://unicode.org/reports/tr9/
- getCharKeys() : array<string|int, mixed>
- Returns an array with processed chars as keys
- getChrArray() : array<string|int, mixed>
- Returns the processed array of UTF-8 chars
- getNumChars() : int
- Returns the number of characters in the processed string
- getOrdArray() : array<string|int, mixed>
- Returns the processed array of UTF-8 codepoints
- getString() : string
- Returns the processed string
- getParagraphs() : array<string|int, mixed>
- P1. Split the text into separate paragraphs.
- getPel() : int
- Get the paragraph embedding level
- isRtlMode() : bool
- Check if the input string contains RTL characters to process
- process() : mixed
- Process the string
- setInput() : mixed
- Set Input data
Properties
$arabic
True if the string contains arabic characters
protected bool $arabic = false
$bidichrarr
Array of processed UTF-8 chars
protected array<string|int,
mixed> $bidichrarr = array()
$bidiordarr
Array of processed UTF-8 codepoints
protected array<string|int,
mixed> $bidiordarr = array()
$bidistr
Processed string
protected string $bidistr = ''
$chardata
Array of character data
protected array<string|int,
mixed> $chardata = array()
$chrarr
Array of UTF-8 chars
protected array<string|int,
mixed> $chrarr = array()
$conv
Convert object
protected
Convert
$conv
$forcertl
If true force processign the string in RTL mode
protected bool $forcertl = false
$ordarr
Array of UTF-8 codepoints
protected array<string|int,
mixed> $ordarr = array()
$shaping
If true enable shaping
protected bool $shaping = true
$str
String to process
protected string $str = ''
Methods
__construct()
Reverse the RLT substrings using the Bidirectional Algorithm http://unicode.org/reports/tr9/
public __construct([string $str
= null
][,
array<string|int,
mixed> $chrarr
= null
][,
array<string|int,
mixed> $ordarr
= null
][,
mixed $forcertl
= false
][,
bool $shaping
= true
]) : mixed
Parameters
- $str : string = null
-
String to convert (if null it will be generated from $chrarr or $ordarr)
- $chrarr : array<string|int, mixed> = null
-
Array of UTF-8 chars (if empty it will be generated from $str or $ordarr)
- $ordarr : array<string|int, mixed> = null
-
Array of UTF-8 codepoints (if empty it will be generated from $str or $chrarr)
- $forcertl : mixed = false
-
If 'R' forces RTL, if 'L' forces LTR
- $shaping : bool = true
-
If true enable the shaping algorithm
Return values
mixed —getCharKeys()
Returns an array with processed chars as keys
public getCharKeys()
: array<string|int,
mixed>
Return values
array<string|int, mixed> —getChrArray()
Returns the processed array of UTF-8 chars
public getChrArray()
: array<string|int,
mixed>
Return values
array<string|int, mixed> —getNumChars()
Returns the number of characters in the processed string
public getNumChars()
: int
Return values
int —getOrdArray()
Returns the processed array of UTF-8 codepoints
public getOrdArray()
: array<string|int,
mixed>
Return values
array<string|int, mixed> —getString()
Returns the processed string
public getString()
: string
Return values
string —getParagraphs()
P1. Split the text into separate paragraphs.
protected getParagraphs()
: array<string|int,
mixed>
A paragraph separator is kept with the previous paragraph.
Return values
array<string|int, mixed> —getPel()
Get the paragraph embedding level
protected getPel(array<string|int,
mixed> $par)
: int
Parameters
- $par : array<string|int, mixed>
-
Paragraph
Return values
int —isRtlMode()
Check if the input string contains RTL characters to process
protected isRtlMode()
: bool
Return values
bool —process()
Process the string
protected process()
: mixed
Return values
mixed —setInput()
Set Input data
protected setInput([string $str
= null
][,
array<string|int,
mixed> $chrarr
= null
][,
array<string|int,
mixed> $ordarr
= null
][,
mixed $forcertl
= false
]) : mixed
Parameters
- $str : string = null
-
String to convert (if null it will be generated from $chrarr or $ordarr)
- $chrarr : array<string|int, mixed> = null
-
Array of UTF-8 chars (if empty it will be generated from $str or $ordarr)
- $ordarr : array<string|int, mixed> = null
-
Array of UTF-8 codepoints (if empty it will be generated from $str or $chrarr)
- $forcertl : mixed = false
-
If 'R' forces RTL, if 'L' forces LTR