本文整理汇总了PHP中unknown::getCity方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::getCity方法的具体用法?PHP unknown::getCity怎么用?PHP unknown::getCity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::getCity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportDeliveryAddress
/**
* Exports the delivery address
*/
protected function exportDeliveryAddress()
{
if ($this->ShippingAddress === null) {
return;
}
if ($this->PLENTY_customerID === null) {
return;
}
$city = trim($this->ShippingAddress->getCity());
$street_arr = PlentymarketsUtils::extractStreetAndHouseNo($this->ShippingAddress->getStreet());
if (isset($street_arr['street']) && strlen($street_arr['street']) > 0) {
$streetName = $street_arr['street'];
} else {
$streetName = trim($this->ShippingAddress->getStreet());
}
if (isset($street_arr['houseNo']) && strlen($street_arr['houseNo']) > 0) {
$streetHouseNumber = $street_arr['houseNo'];
} else {
$streetHouseNumber = '';
}
$zip = trim($this->ShippingAddress->getZipCode());
if (empty($city)) {
$city = PlentymarketsConfig::getInstance()->get('CustomerDefaultCity');
}
if (!isset($streetHouseNumber) || $streetHouseNumber == '') {
$streetHouseNumber = PlentymarketsConfig::getInstance()->get('CustomerDefaultHouseNumber');
}
if (!isset($streetName) || $streetName == '') {
$streetName = PlentymarketsConfig::getInstance()->get('CustomerDefaultStreet');
}
if ($zip == '') {
$zip = PlentymarketsConfig::getInstance()->get('CustomerDefaultZipcode');
}
$Request_SetCustomerDeliveryAddresses = new PlentySoapRequest_SetCustomerDeliveryAddresses();
$Request_SetCustomerDeliveryAddresses->DeliveryAddresses = array();
$Object_SetCustomerDeliveryAddressesCustomer = new PlentySoapRequest_ObjectSetCustomerDeliveryAddresses();
$Object_SetCustomerDeliveryAddressesCustomer->AdditionalName = null;
// string
$Object_SetCustomerDeliveryAddressesCustomer->City = $city;
$Object_SetCustomerDeliveryAddressesCustomer->Company = $this->ShippingAddress->getCompany();
$Object_SetCustomerDeliveryAddressesCustomer->CountryID = $this->getDeliveryCountryID();
// int
$Object_SetCustomerDeliveryAddressesCustomer->CustomerID = $this->PLENTY_customerID;
// int
$Object_SetCustomerDeliveryAddressesCustomer->ExternalDeliveryAddressID = PlentymarketsUtils::getExternalCustomerID($this->ShippingAddress->getId());
// string
$Object_SetCustomerDeliveryAddressesCustomer->FirstName = $this->ShippingAddress->getFirstName();
$Object_SetCustomerDeliveryAddressesCustomer->FormOfAddress = $this->getDeliveryFormOfAddress();
// int
$Object_SetCustomerDeliveryAddressesCustomer->HouseNumber = $streetHouseNumber;
$Object_SetCustomerDeliveryAddressesCustomer->Street = $streetName;
$Object_SetCustomerDeliveryAddressesCustomer->Surname = $this->ShippingAddress->getLastName();
$Object_SetCustomerDeliveryAddressesCustomer->ZIP = $zip;
$Request_SetCustomerDeliveryAddresses->DeliveryAddresses[] = $Object_SetCustomerDeliveryAddressesCustomer;
$Response_SetCustomerDeliveryAddresses = PlentymarketsSoapClient::getInstance()->SetCustomerDeliveryAddresses($Request_SetCustomerDeliveryAddresses);
if (!$Response_SetCustomerDeliveryAddresses->Success) {
throw new PlentymarketsExportEntityException('The delivery address of the customer with the number »' . $this->getCustomerNumber() . '« could not be exported', 2120);
}
$this->PLENTY_addressDispatchID = (int) $Response_SetCustomerDeliveryAddresses->ResponseMessages->item[0]->SuccessMessages->item[0]->Value;
}
开发者ID:pixolith,项目名称:plentymarkets-shopware-connector,代码行数:63,代码来源:PlentymarketsExportEntityCustomer.php
示例2: createFormDataArray
/**
* Fills in the form data array
*
* @param unknown $object
* @return array
*/
protected function createFormDataArray($object)
{
return array("label" => $object->getLabel(), "title" => $object->getTitleId(), "firstname" => $object->getFirstname(), "lastname" => $object->getLastname(), "address1" => $object->getAddress1(), "address2" => $object->getAddress2(), "address3" => $object->getAddress3(), "zipcode" => $object->getZipcode(), "city" => $object->getCity(), "country" => $object->getCountryId(), "cellphone" => $object->getCellphone(), "phone" => $object->getPhone(), "company" => $object->getCompany());
}