Exemplo n.º 1
0
 public function getConnector()
 {
     $req = $this->config->getDomain() . "GetConnector";
     if ($this->getVehicleID() != 0) {
         $req .= "?vehicleID=" . $this->getVehicleID();
     } else {
         $req .= "?year=" . $this->year;
         $req .= "&make=" . urlencode($this->make);
         $req .= "&model=" . urlencode($this->model);
         $req .= "&style=" . urlencode($this->style);
     }
     $req .= "&dataType=" . $this->config->getDataType();
     $resp = $this->helper->curlGet($req);
     $connector_arr = array();
     foreach (json_decode($resp) as $obj) {
         $part = new Part();
         $p = $part->castToPart($obj);
         array_push($connector_arr, $p);
     }
     return $connector_arr;
 }
Exemplo n.º 2
0
 public function powerSearch($search_term = "", $status = "800,900")
 {
     if ($search_term != "") {
         $req = $this->config->getDomain() . "PowerSearch";
         $req .= "?search_term=" . $search_term;
         if ($this->config->isIntegrated()) {
             $req .= "&integrated=true";
         } else {
             $req .= "&integrated=false";
         }
         $req .= "&status=" . $status;
         $req .= "&customerID=" . $this->config->getCustomerID();
         $req .= "&dataType=" . $this->config->getDataType();
         $resp = $this->helper->curlGet($req);
         $Parts_array = array();
         $Part = new Part();
         foreach (json_decode($resp) as $obj) {
             $p = $Part->castToPart($obj);
             array_push($Parts_array, $p);
         }
         return $Parts_array;
     }
     // end if
 }