コード例 #1
0
 /**
  * Task to update the database configuration and install sample data
  *
  * @return  void
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function updateDatabase()
 {
     try {
         $dashboardModel = new DashboardModel();
         $dashboardModel->updateDatabase();
         $this->getInput()->set('success', true);
         $this->getApplication()->redirect($this->getApplication()->get('uri.base.path'));
     } catch (\Exception $e) {
         throw new \RuntimeException(sprintf('Error: ' . $e->getMessage()));
     }
 }
コード例 #2
0
 /**
  * Task to update the database configuration and install sample data
  *
  * @return  void
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function updateDatabase()
 {
     try {
         //echo "DashboardController::updateDatabase" . "\r\n";
         $dashboardModel = new DashboardModel($this->getInput(), $this->getContainer()->get('db'));
         $dashboardModel->updateDatabase($this->getContainer()->get('config'));
         $this->getInput()->set('success', true);
         $this->getApplication()->redirect($this->getApplication()->get('uri.base.path'));
     } catch (\Exception $e) {
         throw new \RuntimeException(sprintf('Error: ' . $e->getMessage()));
     }
 }