Adicion de end point SYSTEM para DBEngines

This commit is contained in:
Brayan Osmar Pereyra Suxo
2014-02-14 09:51:26 -04:00
parent eec84e53bf
commit a66e8757a6
2 changed files with 51 additions and 16 deletions

View File

@@ -100,22 +100,7 @@ class DataBaseConnection
if (isset($dataDBConnection['DBS_TYPE'])) {
$typesExists = array();
G::LoadClass( 'dbConnections' );
$dbs = new dbConnections($pro_uid);
$dbServices = $dbs->getDbServicesAvailables();
foreach ($dbServices as $value) {
$typesExists[] = $value['id'];
}
if (!in_array($dataDBConnection['DBS_TYPE'], $typesExists)) {
throw (new \Exception("This 'dbs_type' is invalid"));
}
}
if (isset($dataDBConnection['DBS_TYPE'])) {
$typesExists = array();
$dbs = new dbConnections($pro_uid);
$dbServices = $dbs->getDbServicesAvailables();
$dbServices = $this->getDbEngines();
foreach ($dbServices as $value) {
$typesExists[] = $value['id'];
}
@@ -313,6 +298,23 @@ class DataBaseConnection
}
}
/**
* Get Data Base Engines
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @return array
*/
public function getDbEngines () {
if (!class_exists('dbConnections')) {
G::LoadClass('dbConnections');
}
$dbs = new dbConnections();
$dbServices = $dbs->getDbServicesAvailables();
return $dbServices;
}
/**
* Validate Process Uid
* @var string $pro_uid. Uid for process