Correccion de mensaje en DATABASE CONNECTION

This commit is contained in:
Brayan Osmar Pereyra Suxo
2014-02-17 15:46:43 -04:00
parent 30aba7dfc6
commit a680781d4d
2 changed files with 26 additions and 13 deletions

View File

@@ -109,6 +109,19 @@ class DataBaseConnection
}
}
if (isset($dataDBConnection['DBS_SERVER']) && $dataDBConnection['DBS_SERVER'] == '') {
throw (new \Exception("This 'dbs_server' is invalid"));
}
if (isset($dataDBConnection['DBS_DATABASE_NAME']) && $dataDBConnection['DBS_DATABASE_NAME'] == '') {
throw (new \Exception("This 'dbs_database_name' is invalid"));
}
if (isset($dataDBConnection['DBS_PORT']) &&
($dataDBConnection['DBS_PORT'] == ''|| $dataDBConnection['DBS_PORT'] == 0)) {
throw (new \Exception("This 'dbs_port' is invalid"));
}
if (isset($dataDBConnection['DBS_ENCODE'])) {
$encodesExists = array();
$dbs = new dbConnections();

View File

@@ -58,12 +58,12 @@ class DataBaseConnection extends Api
* @param string $prj_uid {@min 1} {@max 32}
* @param array $request_data
*
* @param string $dbs_type {@from body} {@min 1}
* @param string $dbs_server {@from body} {@min 1}
* @param string $dbs_database_name {@from body} {@min 1}
* @param string $dbs_type {@from body} {@required true}
* @param string $dbs_server {@from body} {@required true}
* @param string $dbs_database_name {@from body} {@required true}
* @param string $dbs_username {@from body}
* @param string $dbs_port {@from body} {@type float}
* @param string $dbs_encode {@from body} {@min 1}
* @param string $dbs_encode {@from body} {@required true}
* @param string $dbs_password {@from body}
* @param string $dbs_description {@from body}
* @return array
@@ -99,12 +99,12 @@ class DataBaseConnection extends Api
* @param string $prj_uid {@min 1} {@max 32}
* @param array $request_data
*
* @param string $dbs_type {@from body} {@min 1}
* @param string $dbs_server {@from body} {@min 1}
* @param string $dbs_database_name {@from body} {@min 1}
* @param string $dbs_type {@from body} {@required true}
* @param string $dbs_server {@from body} {@required true}
* @param string $dbs_database_name {@from body} {@required true}
* @param string $dbs_username {@from body}
* @param string $dbs_port {@from body} {@type float}
* @param string $dbs_encode {@from body} {@min 1}
* @param string $dbs_encode {@from body} {@required true}
* @param string $dbs_password {@from body}
* @param string $dbs_description {@from body}
* @return array
@@ -141,12 +141,12 @@ class DataBaseConnection extends Api
* @param string $dbs_uid {@min 1} {@max 32}
* @param array $request_data
*
* @param string $dbs_type {@from body}
* @param string $dbs_server {@from body}
* @param string $dbs_database_name {@from body}
* @param string $dbs_type {@from body} {@required true}
* @param string $dbs_server {@from body} {@required true}
* @param string $dbs_database_name {@from body} {@required true}
* @param string $dbs_username {@from body}
* @param string $dbs_port {@from body}
* @param string $dbs_encode {@from body}
* @param string $dbs_port {@from body} {@type float}
* @param string $dbs_encode {@from body} {@required true}
* @param string $dbs_password {@from body}
* @param string $dbs_description {@from body}
* @return void