Example #1
0
 /**
  * @brief check if connection details are valid
  *
  * @access private
  *
  * @param array $connection the database config to check
  *
  * @return bool true if valid, else false
  */
 private function __validDbConfig($connection, $return = false)
 {
     App::import('Model', 'Installer.Install');
     $Install = new Install(false, false, false);
     $Install->set($connection);
     if (!$Install->validates()) {
         return false;
     }
     if ($return) {
         return $Install->data;
     }
     return true;
 }