public function extractTranslationFromPhpFile($path, $trans_methods)
{
$result = array();
$string = Tools::minifyString(file_get_contents($path));
foreach (array_flatten($trans_methods) as $method) {
preg_match_all($method, $string, $matches);
foreach ($matches[1] as $k => $v) {
if (strpos($v, '$') !== false) {
unset($matches[1][$k]);
}
if (strpos($v, '::') !== false) {
unset($matches[1][$k]);
}
}
$result = array_merge($result, array_flip($matches[1]));
}
return $result;
}