Пример #1
0
 /**
  * @param	int		$idUser
  * @return	array | false
  */
 protected function _GetFullContactsList($idUser, $includeDeleted = false)
 {
     $this->_errorMsg = self::ERR_MSG_GET_CONTACTS_LIST;
     $this->_errorNo = self::ERR_NO_GET_CONTACTS_LIST;
     $sql = $this->_commandCreator->GetFullContactsList($idUser, $includeDeleted);
     $listOfContactsInfo = $this->_query($sql);
     if (is_array($listOfContactsInfo)) {
         $result = array();
         foreach ($listOfContactsInfo as $contactInfo) {
             $contactContainer = new ContactContainer();
             $contactContainer->MassSetValue($contactInfo);
             $idAddress = $contactContainer->GetValue('IdAddress', 'int');
             $groups = $this->_GetGroupsByIdContact($idUser, $idAddress);
             if (is_array($groups)) {
                 $contactContainer->SetValue('Groups', $groups);
             }
             $result[] = $contactContainer;
             unset($contactContainer, $groups);
         }
         return $result;
     }
     return false;
 }