本文整理汇总了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
}