Browse Source

Utils : stripAccents + cleanStringToCompare

feature/export_comptable
Guillaume 4 years ago
parent
commit
9266e6b37c
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      ShopBundle/Services/Utils.php

+ 9
- 0
ShopBundle/Services/Utils.php View File

@@ -174,6 +174,15 @@ class Utils
return $truncate;
}

function stripAccents($stripAccents)
{
return strtr($stripAccents,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
}

function cleanStringToCompare($string)
{
return $this->stripAccents(trim(strtolower($string))) ;
}

public function isBot()
{

Loading…
Cancel
Save