Example #1
0
 function fetch_serial_list($source_id, $opac_user_id = -1)
 {
     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_fetchSerialList($opac_user_id);
     }
     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;
         }
     }
     return $ret;
 }