forked from joomla/Component-Builder
Added transliteration to safe field name and safe type naming methods.
This commit is contained in:
parent
39b276ac4b
commit
548af56265
@ -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**
|
||||
|
@ -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**
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user