/** * @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; }