Added transliteration to safe field name and safe type naming methods.

This commit is contained in:
Llewellyn van der Merwe 2019-10-11 16:56:37 +02:00
parent 39b276ac4b
commit 548af56265
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
4 changed files with 10 additions and 2 deletions

View File

@ -150,7 +150,7 @@ TODO
+ *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **253747**
+ *Line count*: **253755**
+ *Field count*: **1347**
+ *File count*: **1618**
+ *Folder count*: **261**

View File

@ -150,7 +150,7 @@ TODO
+ *Version*: 2.10.1
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **253747**
+ *Line count*: **253755**
+ *Field count*: **1347**
+ *File count*: **1618**
+ *Folder count*: **261**

View File

@ -697,6 +697,8 @@ abstract class ComponentbuilderHelper
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
// Transliterate string
$string = self::transliterate($string);
// remove all and keep only characters and numbers
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
// replace white space with underscore (SAFEST OPTION)
@ -751,6 +753,8 @@ abstract class ComponentbuilderHelper
{
$string = self::replaceNumbers($string);
}
// Transliterate string
$string = self::transliterate($string);
// remove all and keep only characters and numbers and point (TODO just one point)
$string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', $string));
// best is to return lower (for all string equality in compiler)

View File

@ -697,6 +697,8 @@ abstract class ComponentbuilderHelper
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
// Transliterate string
$string = self::transliterate($string);
// remove all and keep only characters and numbers
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
// replace white space with underscore (SAFEST OPTION)
@ -751,6 +753,8 @@ abstract class ComponentbuilderHelper
{
$string = self::replaceNumbers($string);
}
// Transliterate string
$string = self::transliterate($string);
// remove all and keep only characters and numbers and point (TODO just one point)
$string = trim(preg_replace("/[^A-Za-z0-9\.]/", '', $string));
// best is to return lower (for all string equality in compiler)