/** * @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(); } $this->throwDbExceptionIfExist(); return $oTenant; }