<?php require zend_deployment_library_path('ZendServerDeploymentHelper') . '/deph.php'; $deph = new DepH(); #$debugger = $deph->getDebugger(); #$debugger->start('10.0.3.1'); $log = $deph->get('log'); $params = $deph->getParams(); /* * DB SETTINGS */ $tplFilename = __DIR__ . '/templates/db.local.php'; $path = $deph->getPath(); $targetFile = $path->getAppsDir() . '/phundament/custom/config/db.local.php'; $template = $deph->getTemplate(); $template->write($tplFilename, $targetFile, [], []); /* * new Module */ $tplFilename = __DIR__ . '/templates/module.local.php'; $path = $deph->getPath(); $targetFile = $path->getAppsDir() . '/phundament/custom/config/' . $params->get('MODULE_NAME') . '.local.php'; $search = ['#MODULE_NAME#', '#MODULE_DB_HOST#', '#MODULE_DB_PORT#', '#MODULE_DB_NAME#', '#MODULE_DB_USER#', '#MODULE_DB_PASS#']; $replace = [$params->get('MODULE_NAME'), $params->get('MODULE_DB_HOST'), $params->get('MODULE_DB_PORT'), $params->get('MODULE_DB_NAME'), $params->get('MODULE_DB_USER'), $params->get('MODULE_DB_PASS')]; $template = $deph->getTemplate(); $template->write($tplFilename, $targetFile, $search, $replace); /* * new Module Class */ $tplFilename = __DIR__ . '/templates/Module.php'; $path = $deph->getPath();