Ejemplo n.º 1
0
 /**
  * @return array
  */
 public function _rawContacts($sSyncType)
 {
     $oAccount = $this->getDefaultAccountFromParam();
     if ($this->oApiCapability->isContactsSupported($oAccount)) {
         $oApiContactsManager = $this->ApiContacts();
         if ($oApiContactsManager) {
             $sOutput = $oApiContactsManager->export($oAccount->IdUser, $sSyncType);
             if (false !== $sOutput) {
                 header('Pragma: public');
                 header('Content-Type: text/csv');
                 header('Content-Disposition: attachment; filename="export.' . $sSyncType . '";');
                 header('Content-Transfer-Encoding: binary');
                 echo $sOutput;
                 return true;
             }
         }
     }
     return false;
 }