当前位置: 首页>>代码示例>>PHP>>正文


PHP Address::setComplement方法代码示例

本文整理汇总了PHP中Address::setComplement方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::setComplement方法的具体用法?PHP Address::setComplement怎么用?PHP Address::setComplement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Address的用法示例。


在下文中一共展示了Address::setComplement方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
开发者ID:viniciustaveira,项目名称:bcash-php-sdk,代码行数:12,代码来源:Teste.php

示例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());
    }
开发者ID:EHER,项目名称:chegamos,代码行数:45,代码来源:OpenGraphTest.php

示例3: 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());
 }
开发者ID:EHER,项目名称:chegamos,代码行数:63,代码来源:PlaceTest.php

示例4: 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);
     }
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:34,代码来源:PaymentRequest.class.php

示例5: 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;
 }
开发者ID:CarolinePaixao,项目名称:SCI,代码行数:22,代码来源:Address.php

示例6: 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;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:TransactionParser.class.php


注:本文中的Address::setComplement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。