本文整理匯總了PHP中Part::castToPart方法的典型用法代碼示例。如果您正苦於以下問題:PHP Part::castToPart方法的具體用法?PHP Part::castToPart怎麽用?PHP Part::castToPart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Part
的用法示例。
在下文中一共展示了Part::castToPart方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getConnector
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;
}
示例2: powerSearch
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
}