Example #1
0
 function fetch_notice_list_full($source_id, $ids = array(), $rec_format = 'raw_array_assoc', $rec_charset = 'utf-8', $w_links = false, $record = false)
 {
     global $charset;
     global $pmb_curl_proxy;
     global $base_path;
     $params = $this->get_source_params($source_id);
     $this->fetch_global_properties();
     if ($params["PARAMETERS"]) {
         $vars = unserialize($params["PARAMETERS"]);
         foreach ($vars as $key => $val) {
             global ${$key};
             ${$key} = $val;
         }
     }
     //on vérifie le protocole à utiliser...
     $this->current_protocole = $protocole;
     $ret = array();
     switch ($this->current_protocole) {
         case JSONRPC:
             $ws = new jsonRPCClient($url);
             break;
         case SOAP:
             $ws = new SoapClient($url . "&wsdl");
             break;
     }
     if ($ws) {
         $res = $ws->pmbesNotices_fetchNoticeListFull($ids, $rec_format, $rec_charset, $w_links);
     }
     if (count($res)) {
         switch ($this->current_protocole) {
             case JSONRPC:
                 $ret = $this->object_to_array($res);
                 break;
             case SOAP:
                 $ret = $this->object_to_array($res);
                 break;
         }
     }
     if ($record) {
         foreach ($ret as $notice) {
             $this->rec_records($notice, $source_id, $search_id);
         }
     }
     return $ret;
 }