26 $this->_moduleTableMap = $tables;
40 if (
'php' != $fileType || !preg_match(
'#.*/(Setup|Resource)/.*\.php$#', $file)) {
44 $dependenciesInfo = [];
46 if (preg_match_all(
'#>gettable(name)?\([\'"]([^\'"]+)[\'"]\)#i',
$contents, $matches)) {
47 $tables = array_pop($matches);
48 foreach ($tables as
$table) {
49 if (!isset($this->_moduleTableMap[
$table])) {
53 if (strtolower($currentModule) !== strtolower($this->_moduleTableMap[
$table])) {
54 $dependenciesInfo[] = [
55 'module' => $this->_moduleTableMap[
$table],
62 foreach ($unKnowTables as $tables) {
63 foreach ($tables as
$table) {
64 $dependenciesInfo[] = [
'module' =>
'Unknown',
'source' =>
$table];
67 return $dependenciesInfo;
__construct(array $tables)
getDependencyInfo($currentModule, $fileType, $file, &$contents)