/** * @param CHelpdeskUser $oHelpdeskUser * @param CHelpdeskThread $oHelpdeskThread * * @return bool */ public function SetThreadSeen(CHelpdeskUser $oHelpdeskUser, $oHelpdeskThread) { $this->oConnection->Execute($this->oCommandCreator->ClearThreadSeen($oHelpdeskUser, $oHelpdeskThread)); $bResult = $this->oConnection->Execute($this->oCommandCreator->SetThreadSeen($oHelpdeskUser, $oHelpdeskThread)); $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param string $sHash * * @return array|bool */ public function deleteMinByHash($sHash) { $mResult = false; if (is_string($sHash) && 0 < strlen($sHash)) { $mResult = $this->oConnection->Execute($this->oCommandCreator->deleteMinByHash($sHash)); } $this->throwDbExceptionIfExist(); return $mResult; }
/** * @return bool */ public function createTables() { $bResult = 1; $aTables = $this->getSqlSchemaAsArray(); foreach ($aTables as $sTableCreateSql) { $bResult &= $this->oConnection->Execute($sTableCreateSql); } $this->throwDbExceptionIfExist(); return (bool) $bResult; }
/** * @param CAccount $oAccount * @param array $aOrder * * @return bool */ public function FoldersOrderUpdate($oAccount, $aOrder) { if (!is_array($aOrder)) { return false; } $this->FoldersOrderClear($oAccount); $this->oConnection->Execute($this->oCommandCreator->FoldersOrderUpdate($oAccount, @json_encode($aOrder))); $this->throwDbExceptionIfExist(); return true; }
/** * @param string $sSearchDesc Default value is empty string. * @param int $iTenantId Default value is **0**. * * @return int|false */ public function getDomainCount($sSearchDesc = '', $iTenantId = 0) { $iResultCount = false; if ($this->oConnection->Execute($this->oCommandCreator->getDomainCount($sSearchDesc, $iTenantId))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $iResultCount = (int) $oRow->domains_count; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $iResultCount; }
/** * @param CSocial &$oSocial * * @return bool */ public function isSocialExists(CSocial $oSocial) { $bResult = false; if ($this->oConnection->Execute($this->oCommandCreator->isSocialExists($oSocial->IdAccount, $oSocial->TypeStr))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $bResult = 0 < (int) $oRow->social_count; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param string $sType * @param string $sIdSocial * @return string */ public function SocialExists($sType, $sIdSocial) { $bResult = false; if ($this->oConnection->Execute($this->oCommandCreator->SocialExists($sType, $sIdSocial))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $bResult = 0 < (int) $oRow->social_count; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param int $iSubscriptionID * * @return array|bool */ public function getSubscriptionById($iSubscriptionID) { $mResult = false; if ($this->oConnection->Execute($this->oCommandCreator->getSubscriptionById($iSubscriptionID))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow && isset($oRow->id_tenant) && 0 < (int) $oRow->id_tenant) { $oSubscription = new CSubscription((int) $oRow->id_tenant); $oSubscription->InitByDbRow($oRow); $mResult = $oSubscription; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $mResult; }
/** * Purges all entries in safelist of particular user. * * @param string $iUserId User identifier. * * @return bool */ public function clearSafetySenders($iUserId) { $bResult = $this->oConnection->Execute($this->oCommandCreator->clearSafetySendersQuery($iUserId)); $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param string $sCalendarId * @param string $sEventId * @return bool */ public function removeEventFromAllGroups($sCalendarId, $sEventId) { $iResult = $this->oConnection->Execute($this->oCommandCreator->removeEventFromAllGroups($sCalendarId, $sEventId)); return (bool) $iResult; }
/** * @param CTenantSocials $oSocial * * @return bool */ public function UpdateSocial(CTenantSocials $oSocial) { $bResult = $this->oConnection->Execute($this->oCommandCreator->UpdateSocial($oSocial)); $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param CAccount $oAccount * @param int $iFetcherID * * @return bool */ public function deleteFetcher($oAccount, $iFetcherID) { $bResult = (bool) $this->oConnection->Execute($this->oCommandCreator->deleteFetcher($oAccount, $iFetcherID)); $this->throwDbExceptionIfExist(); return $bResult; }
public function testConnection() { return $this->oConnection->Connect(); }
/** * @param int $iTenantId * * @return bool */ public function UpdateTenantMainCapa($iTenantId, $sCapa) { $bResult = $this->oConnection->Execute($this->oCommandCreator->UpdateTenantMainCapa($iTenantId, $sCapa)); $this->throwDbExceptionIfExist(); return $bResult; }