/** * @param mixed $mTenantId * @param bool $bIdIsMd5 = false * * @return CTenant */ public function GetTenantById($mTenantId, $bIdIsMd5 = false) { $oTenant = null; if ($this->oConnection->Execute($this->oCommandCreator->GetTenantById($mTenantId, $bIdIsMd5))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $oTenant = new CTenant(); $oTenant->InitByDbRow($oRow); } $this->oConnection->FreeResult(); if ($oTenant !== null) { $oTenant->Socials = $this->GetSocials($oTenant->IdTenant); } } $this->throwDbExceptionIfExist(); return $oTenant; }