Esempio n. 1
0
 /**
  * @param int $iPage
  * @param int $iDomainsPerPage
  * @param string $sOrderBy = 'name'
  * @param bool $bOrderType = true
  * @param string $sSearchDesc = ''
  * @param int $iTenantId = 0
  *
  * @return array | false [IdDomain => [IsInternal, Name]]
  */
 public function GetDomainsList($iPage, $iDomainsPerPage, $sOrderBy = 'name', $bOrderType = true, $sSearchDesc = '', $iTenantId = 0)
 {
     $aDomains = false;
     if ($this->oConnection->Execute($this->oCommandCreator->GetDomainsList($iPage, $iDomainsPerPage, $this->dbOrderBy($sOrderBy), $bOrderType, $sSearchDesc, $iTenantId))) {
         $oRow = null;
         $aDomains = array();
         while (false !== ($oRow = $this->oConnection->GetNextRecord())) {
             $aDomains[$oRow->id_domain] = array((bool) $oRow->is_internal, strtolower($oRow->name));
         }
     }
     $this->throwDbExceptionIfExist();
     return $aDomains;
 }