public function addTableResolver($packagePath, GitPackageConfigDatabase $db) { if (!is_dir($packagePath)) { mkdir($packagePath); } $resolver = $packagePath . '/gpm.resolve.tables.php'; if (file_exists($resolver)) { unlink($resolver); } $this->smarty->assign('tables', $db->getTables()); $this->smarty->assign('prefix', $db->getPrefix()); $resolverContent = $this->smarty->fetch('tables_resolver.tpl'); file_put_contents($resolver, $resolverContent); return $this->addPHPResolver($resolver); }