ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Refinery\String\UTFNormal Class Reference
+ Collaboration diagram for ILIAS\Refinery\String\UTFNormal:

Public Member Functions

 formC ()
 Normalization Form C (NFC), also known as Canonical Decomposition followed by Canonical Composition. More...
 
 formD ()
 Normalization Form D (NFD), also known as Canonical Decomposition. More...
 
 formKD ()
 Normalization Form KC (NFKC), also known as Compatibility Decomposition followed by Canonical Composition. More...
 
 formKC ()
 Normalization Form KD (NFKD), also known as Compatibility Decomposition. More...
 

Protected Member Functions

 getNormalizer ($form)
 
 normalizerExists ()
 

Protected Attributes

Transformation $form_c = null
 
Transformation $form_d = null
 
Transformation $form_kc = null
 
Transformation $form_kd = null
 

Detailed Description

Definition at line 27 of file UTFNormal.php.

Member Function Documentation

◆ formC()

ILIAS\Refinery\String\UTFNormal::formC ( )

Normalization Form C (NFC), also known as Canonical Decomposition followed by Canonical Composition.

Definition at line 37 of file UTFNormal.php.

References ILIAS\Refinery\String\UTFNormal\$form_c, ILIAS\Refinery\String\UTFNormal\getNormalizer(), and null.

37  : Transformation
38  {
39  if ($this->form_c === null) {
40  $this->form_c = $this->getNormalizer(NativeNormalizer::FORM_C);
41  }
42 
43  return $this->form_c;
44  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ formD()

ILIAS\Refinery\String\UTFNormal::formD ( )

Normalization Form D (NFD), also known as Canonical Decomposition.

Definition at line 49 of file UTFNormal.php.

References ILIAS\Refinery\String\UTFNormal\$form_d, ILIAS\Refinery\String\UTFNormal\getNormalizer(), and null.

49  : Transformation
50  {
51  if ($this->form_d === null) {
52  $this->form_d = $this->getNormalizer(NativeNormalizer::FORM_D);
53  }
54 
55  return $this->form_d;
56  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ formKC()

ILIAS\Refinery\String\UTFNormal::formKC ( )

Normalization Form KD (NFKD), also known as Compatibility Decomposition.

Definition at line 73 of file UTFNormal.php.

References ILIAS\Refinery\String\UTFNormal\$form_kc, ILIAS\Refinery\String\UTFNormal\getNormalizer(), and null.

73  : Transformation
74  {
75  if ($this->form_kc === null) {
76  $this->form_kc = $this->getNormalizer(NativeNormalizer::FORM_KC);
77  }
78 
79  return $this->form_kc;
80  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ formKD()

ILIAS\Refinery\String\UTFNormal::formKD ( )

Normalization Form KC (NFKC), also known as Compatibility Decomposition followed by Canonical Composition.

Definition at line 61 of file UTFNormal.php.

References ILIAS\Refinery\String\UTFNormal\$form_kd, ILIAS\Refinery\String\UTFNormal\getNormalizer(), and null.

61  : Transformation
62  {
63  if ($this->form_kd === null) {
64  $this->form_kd = $this->getNormalizer(NativeNormalizer::FORM_KD);
65  }
66 
67  return $this->form_kd;
68  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getNormalizer()

ILIAS\Refinery\String\UTFNormal::getNormalizer (   $form)
protected

Definition at line 82 of file UTFNormal.php.

References ILIAS\Refinery\String\UTFNormal\normalizerExists().

Referenced by ILIAS\Refinery\String\UTFNormal\formC(), ILIAS\Refinery\String\UTFNormal\formD(), ILIAS\Refinery\String\UTFNormal\formKC(), and ILIAS\Refinery\String\UTFNormal\formKD().

82  : Transformation
83  {
84  if ($this->normalizerExists()) {
85  $normalizer = fn($from) => NativeNormalizer::normalize($from, $form);
86  } else {
87  $normalizer = fn($from) => PolyfillNormalizer::normalize($from, $form);
88  }
89 
90  return new \ILIAS\Refinery\Custom\Transformation($normalizer);
91  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizerExists()

ILIAS\Refinery\String\UTFNormal::normalizerExists ( )
protected

Definition at line 93 of file UTFNormal.php.

Referenced by ILIAS\Refinery\String\UTFNormal\getNormalizer().

93  : bool
94  {
95  return class_exists(NativeNormalizer::class) && method_exists(NativeNormalizer::class, 'normalize');
96  }
+ Here is the caller graph for this function:

Field Documentation

◆ $form_c

Transformation ILIAS\Refinery\String\UTFNormal::$form_c = null
protected

Definition at line 29 of file UTFNormal.php.

Referenced by ILIAS\Refinery\String\UTFNormal\formC().

◆ $form_d

Transformation ILIAS\Refinery\String\UTFNormal::$form_d = null
protected

Definition at line 30 of file UTFNormal.php.

Referenced by ILIAS\Refinery\String\UTFNormal\formD().

◆ $form_kc

Transformation ILIAS\Refinery\String\UTFNormal::$form_kc = null
protected

Definition at line 31 of file UTFNormal.php.

Referenced by ILIAS\Refinery\String\UTFNormal\formKC().

◆ $form_kd

Transformation ILIAS\Refinery\String\UTFNormal::$form_kd = null
protected

Definition at line 32 of file UTFNormal.php.

Referenced by ILIAS\Refinery\String\UTFNormal\formKD().


The documentation for this class was generated from the following file: