$patternClass replace by preg_quote($class)  i'm sorry