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


PHP Address::getStreet方法代码示例

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


在下文中一共展示了Address::getStreet方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gettersShouldReturnTheAttributeValue

 /**
  * @test
  */
 public function gettersShouldReturnTheAttributeValue()
 {
     $this->assertAttributeEquals($this->address->getCountry(), 'country', $this->address);
     $this->assertAttributeEquals($this->address->getState(), 'state', $this->address);
     $this->assertAttributeEquals($this->address->getCity(), 'city', $this->address);
     $this->assertAttributeEquals($this->address->getPostalCode(), 'postalCode', $this->address);
     $this->assertAttributeEquals($this->address->getDistrict(), 'district', $this->address);
     $this->assertAttributeEquals($this->address->getStreet(), 'street', $this->address);
     $this->assertAttributeEquals($this->address->getNumber(), 'number', $this->address);
     $this->assertAttributeEquals($this->address->getComplement(), 'complement', $this->address);
 }
开发者ID:leonardorifeli,项目名称:pagseguro,代码行数:14,代码来源:AddressTest.php

示例2: testValidaStreet

 public function testValidaStreet()
 {
     $street = 'Nome da Rua';
     $address = new Address();
     $address->setStreet($street);
     $this->assertEquals($street, $address->getStreet());
 }
开发者ID:dindigital,项目名称:nfe-focus,代码行数:7,代码来源:AddressTest.php

示例3: update

 public function update(Address $object)
 {
     $q = "UPDATE " . self::TABLE . " SET `street`='" . Singleton::create("NullConverter")->fromDOMtoDB($object->getStreet()) . "', `location`='" . Singleton::create("NullConverter")->fromDOMtoDB($object->getLocation()) . "' WHERE addressId='" . addslashes($object->getAddressId()) . "'";
     $pk = $object->getAddressId();
     if ($object->isNew()) {
         if (empty($pk)) {
             $q = "INSERT INTO " . self::TABLE . " (`street`, `location`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getStreet()) . "', '" . Singleton::create("NullConverter")->fromDOMtoDB($object->getLocation()) . "')";
         } else {
             $q = "INSERT INTO " . self::TABLE . " (`street`, `location`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getAddressId()) . "', '" . Singleton::create("NullConverter")->fromDOMtoDB($object->getStreet()) . "', '" . Singleton::create("NullConverter")->fromDOMtoDB($object->getLocation()) . "')";
         }
     }
     $this->db->updateQuery($q);
     if (empty($pk)) {
         $pk = $this->db->selectQuery("SELECT addressId from " . self::TABLE . " ORDER BY addressId DESC limit 1")->getSingleton();
     }
     $result = $this->findByPrimaryKey($pk);
     parent::$dbCache->resetEntity("Address");
     parent::$dbCache->setSingle("Address", $pk, $result);
     return $result;
 }
开发者ID:aeberh,项目名称:php-movico,代码行数:20,代码来源:AddressPersistence.php

示例4: __construct

 public function __construct($name, TaxIdNumber $taxIdNumber, Address $address, BankAccount $account)
 {
     $this->name = $name;
     $this->taxIdNumber = (string) $taxIdNumber;
     $this->postalCode = $address->getPostalCode();
     $this->street = $address->getStreet();
     $this->city = $address->getCity();
     $this->country = $address->getCountry();
     $this->bankName = $account->getBankName();
     $this->bankNumber = $account->getBankNumber();
     $this->bicCode = $account->getBicCode();
 }
开发者ID:cocoders,项目名称:event-store,代码行数:12,代码来源:Buyer.php

示例5: format

 /**
  * Formats an address.
  *
  * @param \Libreworks\Microformats\Address $address
  * @return string The HTML markup
  */
 public function format(Address $address)
 {
     $fields = ['p-street-address' => $address->getStreet(), 'p-extended-address' => $address->getExtended(), 'p-post-office-box' => $address->getPobox(), 'p-locality' => $address->getLocality(), 'p-region' => $address->getRegion(), 'p-postal-code' => $address->getPostal(), 'p-country' => $address->getCountry()];
     $tags = [];
     foreach ($fields as $k => $v) {
         if (strlen($v) > 0) {
             $tags[] = '<span class="' . $k . '">' . htmlspecialchars($v) . '</span>';
         }
     }
     $geo = $address->getGeo();
     if ($geo !== null) {
         $tags[] = '<span class="p-geo">' . $this->geoFormatter->format($geo) . '</span>';
     }
     return '<span class="h-adr">' . implode(' ', $tags) . '</span>';
 }
开发者ID:libreworks,项目名称:microformats,代码行数:21,代码来源:AddressFormatter.php

示例6: __construct

 public function __construct($name, TaxIdNumber $taxIdNumber, Address $address, BankAccount $account)
 {
     if (!$name) {
         throw new \InvalidArgumentException('Name is required');
     }
     $this->name = $name;
     $this->taxIdNumber = (string) $taxIdNumber;
     $this->postalCode = $address->getPostalCode();
     $this->street = $address->getStreet();
     $this->city = $address->getCity();
     $this->country = $address->getCountry();
     $this->bankName = $account->getBankName();
     $this->bankNumber = $account->getBankNumber();
     $this->bicCode = $account->getBicCode();
 }
开发者ID:cocoders,项目名称:event-store,代码行数:15,代码来源:Seller.php

示例7: getParams

 private function getParams(Address $address)
 {
     $params = array(':id' => $address->getId(), ':street_no' => $address->getStreetNo(), ':street' => $address->getStreet(), ':suburb' => $address->getSuburb(), ':city' => $address->getCity(), ':post_code' => $address->getPostCode());
     return $params;
 }
开发者ID:beshad,项目名称:DROP_OFF_PROJECT_FRI1039,代码行数:5,代码来源:AddressDao.php

示例8: encodeAddress

 public function encodeAddress(Address $address)
 {
     return ['street' => $address->getStreet(), 'street2' => $address->getStreet2(), 'zip' => $address->getZip(), 'city' => $address->getCity(), 'country' => $address->getCountry(), 'state' => $address->getState(), 'email' => $address->getEmail(), 'tel' => $address->getTel(), 'fax' => $address->getZip()];
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:4,代码来源:Serializer.php

示例9: sameValueAs

 /**
  * @param Address $other
  * @return bool
  */
 public function sameValueAs(Address $other)
 {
     return $this->getStreet() == $other->getStreet() && $this->getStreetNumber() == $other->getStreetNumber() && $this->getZip() == $other->getZip() && $this->getCity() == $other->getCity();
 }
开发者ID:codeliner,项目名称:php-equalsbuilder,代码行数:8,代码来源:Address.php

示例10: testSetStreetWorks

 public function testSetStreetWorks()
 {
     $address = new Address();
     $address->setStreet('Rua dos bobos');
     $this->assertEquals('Rua dos bobos', $address->getStreet());
 }
开发者ID:hilltool,项目名称:tray-php,代码行数:6,代码来源:AddressTest.php


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