本文整理汇总了PHP中Address::setDistrict方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::setDistrict方法的具体用法?PHP Address::setDistrict怎么用?PHP Address::setDistrict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Address
的用法示例。
在下文中一共展示了Address::setDistrict方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_ecp_PaymentMethod
function create_ecp_PaymentMethod()
{
$uniqueValue = get_unique_value();
$merchantAccountId = 'account-' . $uniqueValue;
$merchantPaymentMethodId = 'pm-' . $uniqueValue;
$email = get_unique_value() . '@nomail.com';
$successUrl = 'http://good.com/';
//need a trailing slash
$errorUrl = 'http://bad.com/';
//need a trailing slash
$name = 'John Vindicia';
$addr1 = '303 Twin Dolphin Drive';
$city = 'Redwood City';
$district = 'CA';
$postalCode = '94065';
$country = 'US';
$address = new Address();
$address->setName($name);
$address->setAddr1($addr1);
$address->setCity($city);
$address->setDistrict($district);
$address->setPostalCode($postalCode);
$address->setCountry($country);
$paymentmethod = new PaymentMethod();
$paymentmethod->setType('ECP');
$paymentmethod->setAccountHolderName($name);
$paymentmethod->setBillingAddress($address);
$paymentmethod->setMerchantPaymentMethodId($merchantPaymentMethodId);
$paymentmethod->setCurrency('USD');
$ecp = new ECP();
$ecp->setAccount('495958930');
$ecp->setRoutingNumber('611111111');
$ecp->setAllowedTransactionType('Inbound');
$ecp->setAccountType('ConsumerChecking');
$paymentmethod->setECP($ecp);
$account = new Account();
$account->setMerchantAccountId($merchantAccountId);
$account->setEmailAddress($email);
$account->setShippingAddress($address);
$account->setEmailTypePreference('html');
$account->setName($name);
$account->setPaymentMethods(array($paymentmethod));
return $account;
}
示例2: create_paypal_PaymentMethod
function create_paypal_PaymentMethod()
{
$uniqueValue = get_unique_value();
$merchantAccountId = 'account-' . $uniqueValue;
$merchantPaymentMethodId = 'pm-' . $uniqueValue;
$email = get_unique_value() . '@nomail.com';
$successUrl = 'http://good.com/';
//need a trailing slash
$errorUrl = 'http://bad.com/';
//need a trailing slash
$name = 'John Vindicia';
$addr1 = '303 Twin Dolphin Drive';
$city = 'Redwood City';
$district = 'CA';
$postalCode = '94065';
$country = 'US';
$address = new Address();
$address->setName($name);
$address->setAddr1($addr1);
$address->setCity($city);
$address->setDistrict($district);
$address->setPostalCode($postalCode);
$address->setCountry($country);
$paymentmethod = new PaymentMethod();
$paymentmethod->setType('PayPal');
$paymentmethod->setAccountHolderName($name);
$paymentmethod->setBillingAddress($address);
$paymentmethod->setMerchantPaymentMethodId($merchantPaymentMethodId);
$paymentmethod->setCurrency('USD');
$paypal = new PayPal();
$paypal->setReturnUrl($successUrl);
$paypal->setCancelUrl($errorUrl);
$paymentmethod->setPaypal($paypal);
$account = new Account();
$account->setMerchantAccountId($merchantAccountId);
$account->setEmailAddress($email);
$account->setShippingAddress($address);
$account->setEmailTypePreference('html');
$account->setName($name);
//$account->setPaymentMethods(array($paymentmethod));
//return $account;
return array('account' => $account, 'paymentmethod' => $paymentmethod);
}
示例3: Main
//.........这里部分代码省略.........
$this->formArray["dm_month"] = removePreZero($dateArr["month"]);
$this->formArray["dm_day"] = removePreZero($dateArr["day"]);
} else {
$this->formArray[$key] = "";
}
break;
default:
$this->formArray[$key] = $value;
}
}
}
}
break;
case "save":
if ($this->formArray["verifiedByID"] != "" && $this->formArray["verifiedByID"] != "xx" && $this->formArray["propertyID"] != "") {
$this->saveVerified($this->formArray["afsID"], $this->formArray["verifiedByID"], $this->formArray["propertyID"]);
}
$ImprovementsBuildingsEncode = new SoapObject(NCCBIZ . "ImprovementsBuildingsEncode.php", "urn:Object");
if ($this->formArray["propertyID"] != "") {
$ImprovementsBuildingsDetails = new SoapObject(NCCBIZ . "ImprovementsBuildingsDetails.php", "urn:Object");
if (!($xmlStr = $ImprovementsBuildingsDetails->getImprovementsBuildings($this->formArray["propertyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$address = new Address();
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$propertyAdministrator = new Person();
$propertyAdministrator->setPersonID($this->formArray["personID"]);
$propertyAdministrator->setLastName($this->formArray["lastName"]);
$propertyAdministrator->setFirstName($this->formArray["firstName"]);
$propertyAdministrator->setMiddleName($this->formArray["middleName"]);
//$propertyAdministrator->setGender($this->formArray["gender"]);
//$propertyAdministrator->setBirthday($this->birthdate);
//$propertyAdministrator->setMaritalStatus($this->formArray["maritalStatus"]);
//$propertyAdministrator->setTin($this->formArray["tin"]);
$propertyAdministrator->setAddressArray($address);
$propertyAdministrator->setTelephone($this->formArray["telephone"]);
//$propertyAdministrator->setMobileNumber($this->formArray["mobileNumber"]);
$propertyAdministrator->setEmail($this->formArray["email"]);
$propertyAdministrator->setDomDocument();
$improvementsBuildings = new ImprovementsBuildings();
$improvementsBuildings->parseDomDocument($domDoc);
$improvementsBuildings->setPropertyID($this->formArray["propertyID"]);
$improvementsBuildings->setAfsID($this->formArray["afsID"]);
$improvementsBuildings->setArpNumber($this->formArray["arpNumber"]);
$improvementsBuildings->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
$improvementsBuildings->setPropertyAdministrator($propertyAdministrator);
$improvementsBuildings->setVerifiedBy($this->formArray["verifiedByID"]);
$improvementsBuildings->setPlottingsBy($this->formArray["plottingsByID"]);
$improvementsBuildings->setNotedBy($this->formArray["notedByID"]);
$improvementsBuildings->setMarketValue($this->formArray["marketValue"]);
$improvementsBuildings->setKind($this->formArray["kind"]);
$improvementsBuildings->setActualUse($this->formArray["actualUse"]);
$improvementsBuildings->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]);
$improvementsBuildings->setAssessmentLevel($this->formArray["assessmentLevel"]);
示例4: rand
require_once 'Vindicia/Soap/Vindicia.php';
require_once 'Vindicia/Soap/Const.php';
$parentID = $argv[1];
print "parent: {$parentID} \n";
$name = "Child One";
$addr1 = "19 Davis Dr";
$city = "Belmont";
$state = "CA";
$postalcode = "94002";
$country = "US";
$email = "childAccount" . rand(10000, 99999) . "@vindicia.com";
$address = new Address();
$address->setName($name);
$address->setAddr1($addr1);
$address->setCity($city);
$address->setDistrict($state);
$address->setPostalCode($postalcode);
$address->setCountry($country);
$accountID = "childAccount" . rand(1000, 9999) . "-" . rand(1000, 999999);
$child1 = new Account();
$child1->setMerchantAccountId($accountID);
$child1->setEmailAddress($email);
$child1->setShippingAddress($address);
$child1->setEmailTypePreference('html');
$child1->setWarnBeforeAutoBilling(false);
$child1->setName($name);
$parent = new Account();
$parent->setMerchantAccountId($parentID);
// use the force flag to remove these children from a previous parent
// and assign them to this new one
//$force=true;
示例5: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$this->formArray["companyID"] = $company->getCompanyID();
$this->formArray["companyName"] = $company->getCompanyName();
$this->formArray["tin"] = $company->getTin();
$this->formArray["telephone"] = $company->getTelephone();
$this->formArray["fax"] = $company->getFax();
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$this->formArray["addressID"] = $address->getAddressID();
$this->formArray["number"] = $address->getNumber();
$this->formArray["street"] = $address->getStreet();
$this->formArray["barangay"] = $address->getBarangay();
$this->formArray["district"] = $address->getDistrict();
$this->formArray["municipalityCity"] = $address->getMunicipalitycity();
$this->formArray["province"] = $address->getProvince();
}
$this->formArray["email"] = $company->getEmail();
$this->formArray["website"] = $company->getWebsite();
}
}
break;
case "save":
$CompanyEncode = new SoapObject(NCCBIZ . "CompanyEncode.php", "urn:Object");
if ($this->formArray["companyID"] != "") {
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
}
//$company->selectRecord($this->formArray["companyID"]);
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTin($this->formArray["tin"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->updateCompany($xmlStr))) {
exit("error update");
}
}
}
} else {
$address = new Address();
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$company = new Company();
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setTin($this->formArray["tin"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->saveCompany($xmlStr, $this->formArray["ownerID"]))) {
exit("error save");
//.........这里部分代码省略.........
示例6: testPopulate
public function testPopulate()
{
$subCategory = new Subcategory();
$subCategory->setId(1234);
$subCategory->setName("Self Service");
$category = new Category();
$category->setId(12);
$category->setName("Restaurantes");
$category->setSubCategory($subCategory);
$city = new City();
$city->setCountry("Brasil");
$city->setState("SP");
$city->setName("São Paulo");
$address = new Address();
$address->setCity($city);
$address->setComplement("1 Andar");
$address->setDistrict("Vila Olímpia");
$address->setNumber("129");
$address->setStreet("Rua Funchal");
$address->setZipcode("04551-069");
$gasStation = new GasStation(array('price_gas' => 1, 23, 'price_vodka' => 23, 45));
$placeInfo = new PlaceInfo();
$placeInfo->setGasStation($gasStation);
$data = new \stdClass();
$data->id = 123;
$data->name = "Chegamos!";
$data->average_rating = 4;
$data->review_count = 3;
$data->category = $category;
$data->subcategory = $subCategory;
$data->address = $address;
$data->point->lat = "-23.529366";
$data->point->lng = "-47.467117";
$data->main_url = "http://chegamos.com/";
$data->other_url = "http://chegamos.com.br/";
$data->icon_url = "http://chegamos.com/img/icon.png";
$data->description = "Description";
$data->created = "01/12/2010 16:19";
$data->phone = "11 2222-3333";
$data->extended = $placeInfo;
$data->num_visitors = 1024;
$data->num_photos = 5;
$this->object->populate($data);
$this->assertEquals(123, $this->object->getId());
$this->assertEquals("Chegamos!", $this->object->getName());
$this->assertEquals(4, $this->object->getAverageRating());
$this->assertEquals("Bom", $this->object->getAverageRatingString());
$this->assertEquals(3, $this->object->getReviewCount());
$this->assertEquals("app\\models\\Category", \get_class((object) $this->object->getCategory()));
$this->assertEquals("Restaurantes - Self Service", (string) $this->object->getCategory());
$this->assertEquals("app\\models\\Address", \get_class((object) $this->object->getAddress()));
$this->assertEquals("Rua Funchal, 129 - Vila Olímpia<br/>São Paulo - SP", (string) $this->object->getAddress());
$this->assertEquals("-23.529366,-47.467117", (string) $this->object->getPoint());
$this->assertEquals("http://chegamos.com/", $this->object->getMainUrl());
$this->assertEquals("http://chegamos.com.br/", $this->object->getOtherUrl());
$this->assertEquals("http://chegamos.com/img/icon.png", $this->object->getIconUrl());
$this->assertEquals("Description", $this->object->getDescription());
$this->assertEquals("01/12/2010 16:19", $this->object->getCreated());
$this->assertEquals("11 2222-3333", $this->object->getPhone());
$this->assertEquals("app\\models\\PlaceInfo", \get_class((object) $this->object->getPlaceInfo()));
$this->assertEquals(1024, $this->object->getNumVisitors());
$this->assertEquals(5, $this->object->getNumPhotos());
}
示例7: Main
//.........这里部分代码省略.........
$this->tpl->parse("MessageBlock", "Message", true);
$this->tpl->set_block("rptsTemplate", "NewUserPassword", "NewUserPasswordBlock");
$this->tpl->set_block("rptsTemplate", "OldUserPassword", "OldUserPasswordBlock");
if ($this->formArray["personID"] != "") {
$this->tpl->set_var("NewUserPasswordBlock", "");
$this->tpl->set_var("oldNewUserRowspan", 3);
$this->tpl->parse("OldUserPasswordBlock", "OldUserPassword", true);
} else {
$this->tpl->set_var("oldNewUserRowspan", 2);
$this->tpl->parse("NewUserPasswordBlock", "NewUserPassword", true);
$this->tpl->set_var("OldUserPasswordBlock", "");
}
break;
}
$PersonEncode = new SoapObject(NCCBIZ . "PersonEncode.php", "urn:Object");
if ($this->formArray["personID"] != "") {
$PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "Person record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$person = new Person();
$person->parseDomDocument($domDoc);
$address = $person->addressArray[0];
if (is_a($address, Address)) {
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
}
$person->setPersonID($this->formArray["personID"]);
$person->setPersonType("adminUser");
$person->setLastName($this->formArray["lastName"]);
$person->setFirstName($this->formArray["firstName"]);
$person->setMiddleName($this->formArray["middleName"]);
$person->setGender($this->formArray["gender"]);
$person->setBirthday($this->birthdate);
$person->setMaritalStatus($this->formArray["maritalStatus"]);
$person->setTin($this->formArray["tin"]);
$person->setAddressArray($address);
$person->setTelephone($this->formArray["telephone"]);
$person->setMobileNumber($this->formArray["mobileNumber"]);
$person->setEmail($this->formArray["email"]);
$person->setDomDocument();
$doc = $person->getDomDocument();
//echo $doc->html_dump_mem();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $PersonEncode->updatePerson($xmlStr))) {
exit("error update");
}
}
}
} else {
$address = new Address();
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
示例8: Address
//*
$address = new Address();
//$address->setAddressID(124);
$address->setNumber("xunit 2415 Megaplaza Building");
$address->setStreet("xADB Avenue corner Garnett Street");
$address->setBarangay("xBarangay San Antonio");
$address->setDistrict("xOrtigas Center");
$address->setMunicipalityCity("xPasig City");
$address->setProvince("xMetro Manila");
$address->setDomDocument();
$address1 = new Address();
//$address->setAddressID(124);
$address1->setNumber("unit 2415 Megaplaza Building");
$address1->setStreet("ADB Avenue corner Garnett Street");
$address1->setBarangay("Barangay San Antonio");
$address1->setDistrict("Ortigas Center");
$address1->setMunicipalityCity("Pasig City");
$address1->setProvince("Metro Manila");
$address1->setDomDocument();
$person = new Person();
//$person->setPersonID(126);
$person->setFirstName("Nelson Juan");
$person->setMiddleName("Miranda");
$person->setLastName(date("H:i:s"));
$person->setGender("male");
$person->setBirthday("1977/07/09");
$person->setMaritalStatus("single");
$person->setTin("1234567890");
$person->setTelephone("026584746");
$person->setMobileNumber("09175302791");
$person->setEmail("nelson@k2ia.com");
示例9: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$AFSDetails = new SoapObject(NCCBIZ . "AFSDetails.php", "urn:Object");
if (!($xmlStr = $AFSDetails->getAFS($this->formArray["afsID"]))) {
echo "xml failed";
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$afs = new AFS();
$afs->parseDomAFS($domDoc);
foreach ($afs as $key => $value) {
$this->formArray[$key] = $value;
}
//print_r($afs);
//exit();
$administrator = $afs->getAdministratorArray();
foreach ($administrator as $key => $value) {
$this->formArray["lastName"] = $value->getLastName();
$this->formArray["firstName"] = $value->getFirstName();
$this->formArray["middleName"] = $value->getMiddleName();
$this->formArray["number"] = $value->getNumber();
$this->formArray["street"] = $value->getStreet();
$this->formArray["barangay"] = $value->getBarangay();
$this->formArray["district"] = $value->getDistrict();
$this->formArray["municipalityCity"] = $value->getMunicipalityCity();
$this->formArray["province"] = $value->getProvince();
$this->formArray["telephone"] = $value->getTelephone();
}
}
}
break;
case "save":
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
if ($this->formArray["afsID"] != "") {
$afs = new AFS();
$afs->selectAFS($this->formArray["afsID"]);
$afs->setOdID($this->formArray["odID"]);
$afs->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
$afs->setCertificateOfTitleNumber($this->formArray["certificateOfTitleNumber"]);
$afs->setCadastralLotNumber($this->formArray["cadastralLotNumber"]);
$afs->setNorth($this->formArray["north"]);
$afs->setSouth($this->formArray["south"]);
$afs->setEast($this->formArray["east"]);
$afs->setWest($this->formArray["west"]);
$afs->setCreatedBy($this->userID);
$afs->setModifiedBy($this->userID);
$person = new Person();
$person->setPersonID($afs->getAdministrator());
$person->setLastName($this->formArray["lastName"]);
$person->setFirstName($this->formArray["firstName"]);
$person->setMiddleName($this->formArray["middleName"]);
$person->setNumber($this->formArray["number"]);
$person->setStreet($this->formArray["street"]);
$person->setBarangay($this->formArray["barangay"]);
$person->setDistrict($this->formArray["district"]);
$person->setMunicipalityCity($this->formArray["municipalityCity"]);
$person->setProvince($this->formArray["province"]);
$person->setTelephone($this->formArray["telephone"]);
$person->setDom();
$afs->setAdministratorArray($person);
$afs->setDomAFS();
$doc = $afs->getDomAFS();
$xmlStr = $doc->dump_mem();
if (!($ret = $AFSEncode->updateAFS($xmlStr))) {
echo "error update";
}
header("location: AFSClose.php" . $this->sess->url("") . $this->sess->add_query(array("odID" => $ret)));
exit;
} else {
$afs = new AFS();
$afs->setOdID($this->formArray["odID"]);
$afs->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
$afs->setCertificateOfTitleNumber($this->formArray["certificateOfTitleNumber"]);
$afs->setCadastralLotNumber($this->formArray["cadastralLotNumber"]);
$afs->setNorth($this->formArray["north"]);
$afs->setSouth($this->formArray["south"]);
$afs->setEast($this->formArray["east"]);
$afs->setWest($this->formArray["west"]);
$afs->setCreatedBy($this->userID);
$afs->setModifiedBy($this->userID);
$adminAddress = new Address();
$adminAddress->setNumber($this->formArray["number"]);
$adminAddress->setStreet($this->formArray["street"]);
$adminAddress->setBarangay($this->formArray["barangay"]);
$adminAddress->setDistrict($this->formArray["district"]);
$adminAddress->setMunicipalityCity($this->formArray["municipalityCity"]);
$adminAddress->setProvince($this->formArray["province"]);
$adminAddress->setDomDocument();
$person = new Person();
$person->setLastName($this->formArray["lastName"]);
$person->setFirstName($this->formArray["firstName"]);
$person->setMiddleName($this->formArray["middleName"]);
$person->setTelephone($this->formArray["telephone"]);
$person->setDomDocument();
$afs->setAdministratorArray($person);
$afs->setDomDocument();
//.........这里部分代码省略.........
示例10: setShippingAddress
/**
* Sets the shipping address for this payment request
* @param String $postalCode
* @param String $street
* @param String $number
* @param String $complement
* @param String $district
* @param String $city
* @param String $state
* @param String $country
*/
public function setShippingAddress($postalCode = null, $street = null, $number = null, $complement = null, $district = null, $city = null, $state = null, $country = null)
{
$param = $postalCode;
if ($this->shipping == null) {
$this->shipping = new Shipping();
}
if (is_array($param)) {
$this->shipping->setAddress(new Address($param));
} elseif ($param instanceof Address) {
$this->shipping->setAddress($param);
} else {
$address = new Address();
$address->setPostalCode($postalCode);
$address->setStreet($street);
$address->setNumber($number);
$address->setComplement($complement);
$address->setDistrict($district);
$address->setCity($city);
$address->setState($state);
$address->setCountry($country);
$this->shipping->setAddress($address);
}
}
示例11: getAddresses
public static function getAddresses($where = null)
{
$dados = Database::ReadAll("address a, city c, state s", "a.*, c.*, s.*", "WHERE a.id_city = c.id_city AND s.id_state = c.id_state " . $where);
if (!$dados) {
return '';
}
foreach ($dados as $dado) {
$address = new Address();
$address->setId($dado['ID_ADDRESS']);
$address->setStreet($dado['NAME_ADDRESS']);
$address->setNumber($dado['NUMBER']);
$address->setComplement($dado['COMPLEMENT']);
$address->setDistrict($dado['DISTRICT']);
$address->setLatitude($dados['LATITUDE']);
$address->setLongitude($dados['LONGITUDE']);
$address->setCity($dado['NAME_CITY']);
$address->setState($dado['INITIALS']);
$address->setPs($dado['PS']);
$addresses[] = $address;
}
return $addresses;
}
示例12: readTransaction
//.........这里部分代码省略.........
$transaction->setExtraAmount($data["extraAmount"]);
}
// <transaction> <installmentCount>
if (isset($data["installmentCount"])) {
$transaction->setInstallmentCount($data["installmentCount"]);
}
if (isset($data["items"]['item']) && is_array($data["items"]['item'])) {
$items = array();
$i = 0;
if (isset($data["items"]['item'][0])) {
foreach ($data["items"]['item'] as $key => $value) {
$item = self::parseTransactionItem($value);
$items[$i] = $item;
$i++;
}
} else {
$items[0] = self::parseTransactionItem($data["items"]['item']);
}
// <transaction> <items>
$transaction->setItems($items);
}
if (isset($data["sender"])) {
// <transaction> <sender>
$sender = new Sender();
// <transaction> <sender> <name>
if (isset($data["sender"]["name"])) {
$sender->setName($data["sender"]["name"]);
}
// <transaction> <sender> <email>
if (isset($data["sender"]["email"])) {
$sender->setEmail($data["sender"]["email"]);
}
if (isset($data["sender"]["phone"])) {
// <transaction> <sender> <phone>
$phone = new Phone();
// <transaction> <sender> <phone> <areaCode>
if (isset($data["sender"]["phone"]["areaCode"])) {
$phone->setAreaCode($data["sender"]["phone"]["areaCode"]);
}
// <transaction> <sender> <phone> <number>
if (isset($data["sender"]["phone"]["number"])) {
$phone->setNumber($data["sender"]["phone"]["number"]);
}
$sender->setPhone($phone);
}
$transaction->setSender($sender);
}
if (isset($data["shipping"]) && is_array($data["shipping"])) {
// <transaction> <shipping>
$shipping = new Shipping();
// <transaction> <shipping> <type>
if (isset($data["shipping"]["type"])) {
$shipping->setType(new ShippingType($data["shipping"]["type"]));
}
// <transaction> <shipping> <cost>
if (isset($data["shipping"]["cost"])) {
$shipping->setCost($data["shipping"]["cost"]);
}
if (isset($data["shipping"]["address"]) && is_array($data["shipping"]["address"])) {
// <transaction> <shipping> <address>
$address = new Address();
// <transaction> <shipping> <address> <street>
if (isset($data["shipping"]["address"]["street"])) {
$address->setStreet($data["shipping"]["address"]["street"]);
}
// <transaction> <shipping> <address> <number>
if (isset($data["shipping"]["address"]["number"])) {
$address->setNumber($data["shipping"]["address"]["number"]);
}
// <transaction> <shipping> <address> <complement>
if (isset($data["shipping"]["address"]["complement"])) {
$address->setComplement($data["shipping"]["address"]["complement"]);
}
// <transaction> <shipping> <address> <city>
if (isset($data["shipping"]["address"]["city"])) {
$address->setCity($data["shipping"]["address"]["city"]);
}
// <transaction> <shipping> <address> <state>
if (isset($data["shipping"]["address"]["state"])) {
$address->setState($data["shipping"]["address"]["state"]);
}
// <transaction> <shipping> <address> <district>
if (isset($data["shipping"]["address"]["district"])) {
$address->setDistrict($data["shipping"]["address"]["district"]);
}
// <transaction> <shipping> <address> <postalCode>
if (isset($data["shipping"]["address"]["postalCode"])) {
$address->setPostalCode($data["shipping"]["address"]["postalCode"]);
}
// <transaction> <shipping> <address> <country>
if (isset($data["shipping"]["address"]["country"])) {
$address->setCountry($data["shipping"]["address"]["country"]);
}
$shipping->setAddress($address);
}
// <transaction> <shipping>
$transaction->setShipping($shipping);
}
return $transaction;
}
示例13: main
function main()
{
switch ($this->formArray["formAction"]) {
case "clear":
$this->tpl->set_var("myAssessorId", "");
$this->tpl->set_var("myPersonId", "");
$this->tpl->set_var("myLastName", "");
$this->tpl->set_var("myFirstName", "");
$this->tpl->set_var("myMiddleName", "");
$this->tpl->set_var("myPosition", "");
$this->tpl->set_var("myGender", "");
$this->tpl->set_var("myBirthday", "");
$this->tpl->set_var("myMaritalStatus", "");
$this->tpl->set_var("myTin", "");
$this->tpl->set_var("myAddressID", "");
$this->tpl->set_var("myNumber", "");
$this->tpl->set_var("myStreet", "");
$this->tpl->set_var("myBarangay", "");
$this->tpl->set_var("myDistrict", "");
$this->tpl->set_var("myMunicipalityCity", "");
$this->tpl->set_var("myProvince", "");
$this->tpl->set_var("myTelephone", "");
$this->tpl->set_var("myMobileNumber", "");
$this->tpl->set_var("myEmail", "");
$this->tpl->set_var("myPosition", "");
$this->tpl->set_block("testAssessorTemplate", "myXMLentries");
$this->tpl->set_var("myXMLentries", "");
$this->tpl->set_var("myXML", "");
break;
case "submit":
$this->assessorDude->setAssessorID($this->formArray["myAssessorId"]);
$this->assessorDude->setPersonID($this->formArray["myPersonId"]);
$this->assessorDude->setLastName($this->formArray["myLastName"]);
$this->assessorDude->setFirstName($this->formArray["myFirstName"]);
$this->assessorDude->setMiddleName($this->formArray["myMiddleName"]);
$this->assessorDude->setPosition($this->formArray["myPosition"]);
$this->assessorDude->setGender($this->formArray["myGender"]);
$this->assessorDude->setBirthday($this->formArray["myBirthday"]);
$this->assessorDude->setMaritalStatus($this->formArray["myMaritalStatus"]);
$this->assessorDude->setTin($this->formArray["myTin"]);
$myAddress = new Address();
$myAddress->setAddressID($this->formArray["myAddressID"]);
$myAddress->setNumber($this->formArray["myNumber"]);
$myAddress->setStreet($this->formArray["myStreet"]);
$myAddress->setBarangay($this->formArray["myBarangay"]);
$myAddress->setDistrict($this->formArray["myDistrict"]);
$myAddress->setMunicipalityCity($this->formArray["myMunicipalityCity"]);
$myAddress->setProvince($this->formArray["myProvince"]);
$this->assessorDude->setTelephone($this->formArray["myTelephone"]);
$this->assessorDude->setMobileNumber($this->formArray["myMobileNumber"]);
$this->assessorDude->setEmail($this->formArray["myEmail"]);
$this->assessorDude->setPosition($this->formArray["myPosition"]);
$myAddress->setDomDocument();
$this->assessorDude->setAddressArray($myAddress);
$this->assessorDude->setDomDocument();
$domObj = $this->assessorDude->getDomDocument();
$assessorDudeInfo = $this->parseMyDom($domObj);
$this->tpl->set_var("myAssessorId", $this->formArray["myAssessorId"]);
$this->tpl->set_var("myPersonId", $this->formArray["myPersonId"]);
$this->tpl->set_var("myLastName", $this->formArray["myLastName"]);
$this->tpl->set_var("myFirstName", $this->formArray["myFirstName"]);
$this->tpl->set_var("myMiddleName", $this->formArray["myMiddleName"]);
$this->tpl->set_var("myPosition", $this->formArray["myPosition"]);
$this->tpl->set_var("myGender", $this->formArray["myGender"]);
$this->tpl->set_var("myBirthday", $this->formArray["myBirthday"]);
$this->tpl->set_var("myMaritalStatus", $this->formArray["myMaritalStatus"]);
$this->tpl->set_var("myTin", $this->formArray["myTin"]);
$this->tpl->set_var("myAddressID", $this->formArray["myAddressID"]);
$this->tpl->set_var("myNumber", $this->formArray["myNumber"]);
$this->tpl->set_var("myStreet", $this->formArray["myStreet"]);
$this->tpl->set_var("myBarangay", $this->formArray["myBarangay"]);
$this->tpl->set_var("myDistrict", $this->formArray["myDistrict"]);
$this->tpl->set_var("myMunicipalityCity", $this->formArray["myMunicipalityCity"]);
$this->tpl->set_var("myProvince", $this->formArray["myProvince"]);
$this->tpl->set_var("myTelephone", $this->formArray["myTelephone"]);
$this->tpl->set_var("myMobileNumber", $this->formArray["myMobileNumber"]);
$this->tpl->set_var("myEmail", $this->formArray["myEmail"]);
$this->tpl->set_var("myPosition", $this->formArray["myPosition"]);
$this->tpl->set_block("testAssessorTemplate", "myXMLentries");
$this->tpl->set_var("myParsedXML", "" . $assessorDudeInfo . "" . $myAddressString . "");
$this->tpl->set_var("myXML", htmlentities($domObj->dump_mem(true)));
break;
default:
$this->tpl->set_var("myAssessorId", "fill in the blank");
$this->tpl->set_var("myPersonId", "fill in the blank");
$this->tpl->set_var("myLastName", "fill in the blank");
$this->tpl->set_var("myFirstName", "fill in the blank");
$this->tpl->set_var("myMiddleName", "fill in the blank");
$this->tpl->set_var("myPosition", "fill in the blank");
$this->tpl->set_var("myGender", "fill in the blank");
$this->tpl->set_var("myBirthday", "fill in the blank");
$this->tpl->set_var("myMaritalStatus", "fill in the blank");
$this->tpl->set_var("myTin", "fill in the blank");
$this->tpl->set_var("myAddressID", "fill in the blank");
$this->tpl->set_var("myNumber", "fill in the blank");
$this->tpl->set_var("myStreet", "fill in the blank");
$this->tpl->set_var("myBarangay", "fill in the blank");
$this->tpl->set_var("myDistrict", "fill in the blank");
$this->tpl->set_var("myMunicipalityCity", "fill in the blank");
$this->tpl->set_var("myProvince", "fill in the blank");
//.........这里部分代码省略.........
示例14: Main
//.........这里部分代码省略.........
$this->formArray["do_month"] = removePreZero($dateArr["month"]);
$this->formArray["do_day"] = removePreZero($dateArr["day"]);
} else {
$this->formArray[$key] = "";
}
break;
default:
$this->formArray[$key] = $value;
}
}
}
}
break;
case "save":
if ($this->formArray["verifiedByID"] != "" && $this->formArray["verifiedByID"] != "xx" && $this->formArray["propertyID"] != "") {
$this->saveVerified($this->formArray["afsID"], $this->formArray["verifiedByID"], $this->formArray["propertyID"]);
}
$PlantsTreesEncode = new SoapObject(NCCBIZ . "PlantsTreesEncode.php", "urn:Object");
if ($this->formArray["propertyID"] != "") {
$PlantsTreesDetails = new SoapObject(NCCBIZ . "PlantsTreesDetails.php", "urn:Object");
if (!($xmlStr = $PlantsTreesDetails->getPlantsTrees($this->formArray["propertyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$address = new Address();
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$propertyAdministrator = new Person();
$propertyAdministrator->setPersonID($this->formArray["personID"]);
$propertyAdministrator->setLastName($this->formArray["lastName"]);
$propertyAdministrator->setFirstName($this->formArray["firstName"]);
$propertyAdministrator->setMiddleName($this->formArray["middleName"]);
//$propertyAdministrator->setGender($this->formArray["gender"]);
//$propertyAdministrator->setBirthday($this->birthdate);
//$propertyAdministrator->setMaritalStatus($this->formArray["maritalStatus"]);
//$propertyAdministrator->setTin($this->formArray["tin"]);
$propertyAdministrator->setAddressArray($address);
$propertyAdministrator->setTelephone($this->formArray["telephone"]);
//$propertyAdministrator->setMobileNumber($this->formArray["mobileNumber"]);
$propertyAdministrator->setEmail($this->formArray["email"]);
$propertyAdministrator->setDomDocument();
$plantsTrees = new PlantsTrees();
$plantsTrees->parseDomDocument($domDoc);
$plantsTrees->setPropertyID($this->formArray["propertyID"]);
$plantsTrees->setAfsID($this->formArray["afsID"]);
$plantsTrees->setArpNumber($this->formArray["arpNumber"]);
$plantsTrees->setPropertyIndexNumber($this->formArray["propertyIndexNumber"]);
$plantsTrees->setPropertyAdministrator($propertyAdministrator);
$plantsTrees->setVerifiedBy($this->formArray["verifiedByID"]);
$plantsTrees->setPlottingsBy($this->formArray["plottingsByID"]);
$plantsTrees->setNotedBy($this->formArray["notedByID"]);
$plantsTrees->setMarketValue($this->formArray["marketValue"]);
$plantsTrees->setKind($this->formArray["kind"]);
$plantsTrees->setActualUse($this->formArray["actualUse"]);
$plantsTrees->setAdjustedMarketValue($this->formArray["adjustedMarketValue"]);
$plantsTrees->setAssessmentLevel($this->formArray["assessmentLevel"]);
示例15: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$person = new Person();
$person->parseDomDocument($domDoc);
list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $person->getBirthday());
$this->formArray["personID"] = $person->getPersonID();
$this->formArray["lastName"] = $person->getLastName();
$this->formArray["firstName"] = $person->getFirstName();
$this->formArray["middleName"] = $person->getMiddleName();
$this->formArray["gender"] = $person->getGender();
$this->formArray["birth_year"] = removePreZero($dateArr["year"]);
$this->formArray["birth_month"] = removePreZero($dateArr["month"]);
$this->formArray["birth_day"] = removePreZero($dateArr["day"]);
$this->formArray["maritalStatus"] = $person->getMaritalStatus();
$this->formArray["tin"] = $person->getTin();
$address = $person->addressArray[0];
if (is_a($address, Address)) {
$this->formArray["addressID"] = $address->getAddressID();
$this->formArray["number"] = $address->getNumber();
$this->formArray["street"] = $address->getStreet();
$this->formArray["barangay"] = $address->getBarangay();
$this->formArray["district"] = $address->getDistrict();
$this->formArray["municipalityCity"] = $address->getMunicipalitycity();
$this->formArray["province"] = $address->getProvince();
}
$this->formArray["telephone"] = $person->getTelephone();
$this->formArray["mobileNumber"] = $person->getMobileNumber();
$this->formArray["email"] = $person->getEmail();
}
}
break;
case "save":
$PersonEncode = new SoapObject(NCCBIZ . "PersonEncode.php", "urn:Object");
if ($this->formArray["personID"] != "") {
$PersonDetails = new SoapObject(NCCBIZ . "PersonDetails.php", "urn:Object");
if (!($xmlStr = $PersonDetails->getPersonDetails($this->formArray["personID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$person = new Person();
$person->parseDomDocument($domDoc);
$address = $person->addressArray[0];
if (is_a($address, Address)) {
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
}
$person->setPersonID($this->formArray["personID"]);
$person->setLastName($this->formArray["lastName"]);
$person->setFirstName($this->formArray["firstName"]);
$person->setMiddleName($this->formArray["middleName"]);
$person->setGender($this->formArray["gender"]);
$person->setBirthday($this->birthdate);
$person->setMaritalStatus($this->formArray["maritalStatus"]);
$person->setTin($this->formArray["tin"]);
$person->setAddressArray($address);
$person->setTelephone($this->formArray["telephone"]);
$person->setMobileNumber($this->formArray["mobileNumber"]);
$person->setEmail($this->formArray["email"]);
$person->setDomDocument();
$doc = $person->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $PersonEncode->updatePerson($xmlStr))) {
exit("error update");
}
}
}
} else {
$address = new Address();
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$person = new Person();
$person->setPersonID($this->formArray["personID"]);
$person->setLastName($this->formArray["lastName"]);
$person->setFirstName($this->formArray["firstName"]);
//.........这里部分代码省略.........