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