public function updateContentMetadata($data) { $dbConnection = PdoUtils::obtainConnection('CMS'); if ($dbConnection == null) { return Message::ERROR_NO_DB_CONNECTION; } $dbConnection->beginTransaction(); $contentDetails = array(); try { $contents = new ContentsDao($dbConnection); $contentDetails = $contents->updateContentMetadata($data); $dbConnection->commit(); } catch (\Exception $e) { $dbConnection->rollBack(); echo $e->getMessage(); exit; } PdoUtils::closeConnection($dbConnection); return $contentDetails; }
public function getContentDeliveryTypesById($cmdId) { $dbConnection = PdoUtils::obtainConnection('CMS'); if ($dbConnection == null) { return Message::ERROR_NO_DB_CONNECTION; } $dbConnection->beginTransaction(); $contentMetaData = array(); try { $contents = new ContentsDao($dbConnection); $contentMetaData = $contents->getContentDeliveryTypesById($cmdId); $dbConnection->commit(); } catch (\Exception $e) { $dbConnection->rollBack(); print_r($e); exit; } PdoUtils::closeConnection($dbConnection); return $contentMetaData; }