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