/** * Sets the needed static variables * * @return void */ private static function _setStaticVars() { // Gets the instance of the string utilities self::$_str = Woops_String_Utils::getInstance(); // Static variables are set self::$_hasStatic = true; }
/** * Writes the INI file for the third install step * * @return void */ protected function _writeDatabaseConfiguration() { // Gets the INI file $iniParser = new Woops_Ini_Parser(self::$_env->getPath('config/woops.ini.php')); $iniFile = $iniParser->getIniObject(); // Gets the incoming variables $vars = $this->_getModuleVar('database'); // Gets the database section $dbSection = $iniFile->getItem('database'); // Gets the configured values $driver = $vars['driver']; $host = $vars['host']; $database = $vars['database']; $port = $vars['port'] ? $vars['port'] : ''; $user = $vars['user'] ? $vars['user'] : ''; $password = $vars['password'] ? $vars['password'] : ''; $tablePrefix = $vars['tablePrefix'] ? $vars['tablePrefix'] : ''; // Writes the configured values $dbSection->newValueItem('driver', $driver); $dbSection->newValueItem('host', $host); $dbSection->newValueItem('database', $database); $dbSection->newValueItem('port', $port); $dbSection->newValueItem('user', $user); $dbSection->newValueItem('password', $password); $dbSection->newValueItem('tablePrefix', $tablePrefix); // Writes the INI file to the config directory $iniFile->toFile('woops.ini.php', self::$_env->getPath('config'), true); }