private function getConfigToConnectionString() { $config = BigBrother::getConfig(); $dbConfig = $config->database; $connectionString = (string) $dbConfig->driver . ':host=' . (string) $dbConfig->host . (!empty($dbConfig->port) ? ';port=' . (string) $dbConfig->port : '') . ';dbname=' . (string) $dbConfig->schema; return array('string' => $connectionString, 'username' => (string) $dbConfig->username, 'password' => (string) $dbConfig->password); }
public function indexAction(Request $request) { $config = null; try { $config = BigBrother::getConfig(); } catch (\Exception $e) { } if (empty($config)) { return $this->render('LancerLanceBundle:Default:install.html.twig', array('base_dir' => realpath($this->container->getParameter('kernel.root_dir') . '/..'), 'message' => $this->getMessage($request->getSession()))); } $this->check(); $installer = new Installer(); $installer->run(); return $this->RedirectToRoute('home'); }
public function __construct() { $this->installContent = BigBrother::getInstallContent(); $this->config = BigBrother::getConfig(); }