public function addResourceResolver($packagePath, $resources)
 {
     if (!is_dir($packagePath)) {
         mkdir($packagePath);
     }
     $resolver = $packagePath . '/gpm.resolve.resources.php';
     if (file_exists($resolver)) {
         unlink($resolver);
     }
     $this->smarty->assign('resources', var_export($resources, true));
     $resolverContent = $this->smarty->fetch('resource_resolver.tpl');
     file_put_contents($resolver, $resolverContent);
     return $this->addPHPResolver($resolver);
 }
 private function loadSmarty()
 {
     $this->smarty = $this->modx->getService('smarty', 'smarty.modSmarty');
     $this->smarty->setTemplatePath($this->modx->gitpackagemanagement->getOption('templatesPath') . '/gitpackagebuild/');
     $this->smarty->assign('lowercasename', $this->config->getLowCaseName());
 }