/** * Obtains twilio numbers for default accounts with allowed twilio. Tenant identifier is used for look up. * * @param $iTenantId Tenant identifier. * * @return array | false */ public function getTwilioNumbers($iTenantId) { $aUsers = false; if ($this->oConnection->Execute($this->oCommandCreator->getTwilioNumbersQuery($iTenantId))) { $oRow = null; $aUsers = array(); while (false !== ($oRow = $this->oConnection->GetNextRecord())) { $aUsers[$oRow->twilio_number] = !!$oRow->twilio_default_number; } } $this->throwDbExceptionIfExist(); return $aUsers; }