classes-Com-Tecnick-Unicode-Bidi

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Com\Tecnick\Unicode\Bidi

Tags
since
2015-07-13
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2015 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-unicode

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()

$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

Return values
mixed
 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy