本文整理汇总了PHP中Address::setNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::setNumber方法的具体用法?PHP Address::setNumber怎么用?PHP Address::setNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Address
的用法示例。
在下文中一共展示了Address::setNumber方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createAddress
function createAddress()
{
$address = new Address();
$address->setAddress("Av. Tiradentes");
$address->setNumber("123");
$address->setComplement("Ap. 203");
$address->setNeighborhood("Centro");
$address->setCity("São Paulo");
$address->setState(StateEnum::SAO_PAULO);
$address->setZipCode("17500000");
return $address;
}
示例2: testPopulateWithPlace
public function testPopulateWithPlace()
{
$point = new Point();
$point->setLat('-23.59243454');
$point->setLng('-46.68677054');
$city = new City();
$city->setCountry('BR');
$city->setState('SP');
$city->setName('São Paulo');
$category = new Category();
$category->setId('123');
$category->setName('Empresas de Internet');
$address = new Address();
$address->setStreet("Rua Funchal");
$address->setNumber(129);
$address->setComplement('6o andar');
$address->setCity($city);
$place = new Place();
$place->setId("M25GJ288");
$place->setName("Apontador.com - São Paulo");
$place->setDescription("Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br).");
$place->setIconUrl("http://localphoto.s3.amazonaws.com/C40372534F143O1437_9896391605729015_l.jpg");
$place->setPoint($point);
$place->setCategory($category);
$place->setAddress($address);
$this->og->populate($place);
$rootUrl = \ROOT_URL;
$testMeta = <<<META
\t<meta property="og:title" content="Apontador.com - São Paulo"/>
\t<meta property="og:description" content="Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br)."/>
\t<meta property="og:image" content="http://maplink.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054"/>
\t<meta property="og:url" content="{$rootUrl}sp/s-o-paulo/empresas-de-internet/apontador-com-s-o-paulo/M25GJ288.html"/>
\t<meta property="og:street-address" content="Rua Funchal, 129"/>
\t<meta property="og:locality" content="São Paulo"/>
\t<meta property="og:region" content="SP"/>
\t<meta property="og:country-name" content="Brasil"/>
\t<meta property="og:latitude" content="-23.59243454"/>
\t<meta property="og:longitude" content="-46.68677054"/>
\t<meta property="og:type" content="company"/>
META;
$this->assertEquals($testMeta, $this->og->getMeta());
$testArray = array('title' => 'Apontador.com - São Paulo', 'description' => 'Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br).', 'image' => 'http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054', 'url' => ROOT_URL . 'sp/s-o-paulo/empresas-de-internet/apontador-com-s-o-paulo/M25GJ288.html', 'street-address' => 'Rua Funchal, 129', 'locality' => 'São Paulo', 'region' => 'SP', 'country-name' => 'Brasil', 'latitude' => '-23.59243454', 'longitude' => '-46.68677054', 'type' => 'company');
$this->assertEquals($testArray, $this->og->getArray());
}
示例3: testPopulateWithPlace
public function testPopulateWithPlace()
{
$point = new Point();
$point->setLat('-23.59243454');
$point->setLng('-46.68677054');
$city = new City();
$city->setCountry('BR');
$city->setState('SP');
$city->setName('São Paulo');
$category = new Category();
$category->setId('067');
$category->setName('Restaurante');
$address = new Address();
$address->setStreet("R. Min. Jesuino Cardoso");
$address->setNumber(473);
$address->setCity($city);
$place = new Place();
$place->setId("UCV34B2P");
$place->setName("Uziel Restaurante");
$place->setDescription("Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R\$ 26,90, mas você paga no máximo R\$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant");
$place->setIconUrl("http://maplink.com.br/widget?v=4.1&lat=-23.5926083&lng=-46.6818329");
$place->setPoint($point);
$place->setCategory($category);
$place->setAddress($address);
$this->abm->populate($place);
$rootUrl = \ROOT_URL;
$testMeta = <<<META
\t<meta property="restaurant:title" content="Uziel Restaurante"/>
\t<meta property="restaurant:description" content="Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R\$ 26,90, mas você paga no máximo R\$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant"/>
\t<meta property="restaurant:image" content="http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054"/>
\t<meta property="restaurant:url" content="{$rootUrl}sp/s-o-paulo/restaurante/uziel-restaurante/UCV34B2P.html"/>
\t<meta property="restaurant:address" content="R. Min. Jesuino Cardoso, 473"/>
\t<meta property="restaurant:city" content="São Paulo"/>
\t<meta property="restaurant:state" content="SP"/>
\t<meta property="restaurant:country-name" content="Brasil"/>
\t<meta property="restaurant:type" content="restaurant"/>
META;
$this->assertEquals($testMeta, $this->abm->getMeta());
$testArray = array('title' => 'Uziel Restaurante', 'description' => 'Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R$ 26,90, mas você paga no máximo R$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant', 'image' => 'http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054', 'url' => ROOT_URL . 'sp/s-o-paulo/restaurante/uziel-restaurante/UCV34B2P.html', 'address' => 'R. Min. Jesuino Cardoso, 473', 'city' => 'São Paulo', 'state' => 'SP', 'country-name' => 'Brasil', 'type' => 'restaurant');
$this->assertEquals($testArray, $this->abm->getArray());
}
示例4: executeConfirmStudent
//.........这里部分代码省略.........
$con->beginTransaction();
if (is_null($student)) {
//el alumno no existe. Creo la persona y el alumno
$s_person = new Person();
$s_person->setLastname($s_lastname);
$s_person->setFirstname($s_firstname);
$s_person->setSex($s_sex);
$s_person->setIdentificationType($s_identification_type);
$s_person->setIdentificationNumber($s_identification_number);
$s_person->setPhone($s_phone);
$s_person->setBirthdate($s_birthdate);
$s_person->setIsActive(true);
$s_person->setBirthCity($s_birth_city);
$s_person->save(Propel::getConnection());
$student = new Student();
$student->setPerson($s_person);
$student->setGlobalFileNumber('888888');
//Nro de legajo??
$student->setOriginSchoolId($s_origin_school_id);
$student->setHealthCoverageId($s_health_coverage_id);
$student->save(Propel::getConnection());
/* Recupero department, state ,country*/
if (!is_null($s_birth_city)) {
$city = CityPeer::retrieveByPk($s_birth_city);
$student->getPerson()->setBirthCountry($city->getDepartment()->getState()->getCountry()->getId());
$student->getPerson()->setBirthState($city->getDepartment()->getState()->getId());
$student->getPerson()->setBirthDepartment($city->getDepartment()->getId());
}
//chequeo domicilio
if (!is_null($s_city) || !is_null($s_street) || !is_null($s_number) || !is_null($s_floor) || is_null($s_flat)) {
$a = new Address();
$a->setCityId($s_city);
$a->setStreet($s_street);
$a->setNumber($s_number);
$a->setFloor($s_floor);
$a->setFlat($s_flat);
$student->getPerson()->setAddress($a);
$student->getPerson()->save(Propel::getConnection());
$data['message'] = "El alumno ha sido confirmado.";
}
} else {
//seteo isActive
$student->getPerson()->setIsActive(true);
$student->save(Propel::getConnection());
$data['message'] = "El alumno fue actualizado correctamente.";
}
//chequeo campos obligatorios
if (!is_null($m_identification_type) && !is_null($m_identification_number) && !is_null($m_lastname) && trim($m_lastname) != "" && !is_null($m_firstname) && trim($m_firstname) != "") {
//busco si ya existe.
$m_tutor = TutorPeer::findByDocumentTypeAndNumber($m_identification_type, $m_identification_number);
if (is_null($m_tutor)) {
//el tutor no existe. Lo creo
$m_person = new Person();
$m_person->setLastname($m_lastname);
$m_person->setFirstname($m_firstname);
$m_person->setIdentificationType($m_identification_type);
$m_person->setIdentificationNumber($m_identification_number);
$m_person->setSex(SexType::FEMALE);
$m_person->setPhone($m_phone);
$m_person->setEmail($m_email);
$m_person->setBirthdate($m_birthdate);
$m_person->setIsActive(true);
$m_person->setBirthCity($m_birth_city);
$m_person->save(Propel::getConnection());
$m_tutor = new Tutor();
$m_tutor->setPerson($m_person);
示例5: 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());
}
示例6: 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");
//.........这里部分代码省略.........
示例7: 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"]);
//.........这里部分代码省略.........
示例8: Main
//.........这里部分代码省略.........
if ($this->usernameAlreadyExists() == true) {
$this->message = "Error. Cannot Save. Username already exists.";
$this->tpl->set_var("message", $this->message);
$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"]);
示例9: 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);
}
}
示例10: testSetNumberWorks
public function testSetNumberWorks()
{
$address = new Address();
$address->setNumber(666);
$this->assertEquals(666, $address->getNumber());
}
示例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: testEmptyNumber
/**
* @expectedException NfeFocus\Exception\FieldRequiredException
*/
public function testEmptyNumber()
{
$number = '';
$address = new Address();
$address->setNumber($number);
}
示例13: 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;
}
示例14: 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");
//.........这里部分代码省略.........
示例15: Address
return $ret;
}
}
//*
$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");