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


PHP Address::getId方法代码示例

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


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

示例1: testDelete

 /**
  * @todo Implement testDelete().
  */
 public function testDelete()
 {
     $this->testSave();
     $id = $this->object->getId();
     $this->object->delete();
     $obj = new Address($id);
     $this->assertEquals($obj, new Address());
 }
开发者ID:swat30,项目名称:safeballot,代码行数:11,代码来源:AddressTest.php

示例2: 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

示例3: setAddress

 /**
  * Declares an association between this object and a Address object.
  *
  * @param             Address $v
  * @return Account The current object (for fluent API support)
  * @throws PropelException
  */
 public function setAddress(Address $v = null)
 {
     if ($v === null) {
         $this->setAddressId(NULL);
     } else {
         $this->setAddressId($v->getId());
     }
     $this->aAddress = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Address object, it will not be re-added.
     if ($v !== null) {
         $v->addAccount($this);
     }
     return $this;
 }
开发者ID:dapepe,项目名称:tymio,代码行数:22,代码来源:BaseAccount.php

示例4: filterByAddress

 /**
  * Filter the query by a related Address object
  *
  * @param   Address|PropelObjectCollection $address The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 DomainQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByAddress($address, $comparison = null)
 {
     if ($address instanceof Address) {
         return $this->addUsingAlias(DomainPeer::ADDRESS_ID, $address->getId(), $comparison);
     } elseif ($address instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DomainPeer::ADDRESS_ID, $address->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAddress() only accepts arguments of type Address or PropelCollection');
     }
 }
开发者ID:dapepe,项目名称:tymio,代码行数:22,代码来源:BaseDomainQuery.php

示例5: setAddressBilling

 public function setAddressBilling(Address $address)
 {
     $this->id_billing = $address->getId();
     return true;
 }
开发者ID:dispxxx,项目名称:leshop,代码行数:5,代码来源:Order.class.php

示例6: update

 public function update(Address $address)
 {
     $id = $address->getId();
     $ship_address = $this->db->quote($address->getShipaddress());
     $ship_city = $this->db->quote($address->getShipCity());
     $ship_postal_code = $this->db->quote($address->getShipPostalCode());
     $ship_region = $this->db->quote($address->getShipRegion());
     $ship_country = $this->db->quote($address->getShipCountry());
     $bill_address = $this->db->quote($address->getBilladdress());
     $bill_city = $this->db->quote($address->getBillCity());
     $bill_postal_code = $this->db->quote($address->getBillPostalCode());
     $bill_region = $this->db->quote($address->getBillRegion());
     $bill_country = $this->db->quote($address->getBillCountry());
     $query = "UPDATE address SET ship_address=" . $ship_address . ", ship_city=" . $ship_city . ", ship_postal_code=" . $ship_postal_code . ", ship_region=" . $ship_region . ", ship_country=" . $ship_country . ", bill_address=" . $bill_address . ", bill_city=" . $bill_city . ", bill_postal_code=" . $bill_postal_code . ", bill_region=" . $bill_region . ", bill_country=" . $bill_country . ",WHERE id='" . $id . "'";
     $res = $this->db->exec($query);
     if ($res) {
         return $this->findById($id);
     } else {
         return "Internal Server Error";
     }
 }
开发者ID:berserkr1,项目名称:e-commerce,代码行数:21,代码来源:AddressManager.class.php

示例7: _canProcessAddress

 /**
  * Check whether specified address should be processed in after_save event handler
  *
  * @param Address $address
  * @return bool
  */
 protected function _canProcessAddress($address)
 {
     if ($address->getForceProcess()) {
         return true;
     }
     if ($this->_coreRegistry->registry(self::VIV_CURRENTLY_SAVED_ADDRESS) != $address->getId()) {
         return false;
     }
     $configAddressType = $this->_customerAddress->getTaxCalculationAddressType();
     if ($configAddressType == \Magento\Customer\Model\Address\AbstractAddress::TYPE_SHIPPING) {
         return $this->_isDefaultShipping($address);
     }
     return $this->_isDefaultBilling($address);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:20,代码来源:Observer.php

示例8: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Address $obj A Address object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         AddressPeer::$instances[$key] = $obj;
     }
 }
开发者ID:dapepe,项目名称:tymio,代码行数:22,代码来源:BaseAddressPeer.php

示例9: prune

 /**
  * Exclude object from result
  *
  * @param   Address $address Object to remove from the list of results
  *
  * @return AddressQuery The current query, for fluid interface
  */
 public function prune($address = null)
 {
     if ($address) {
         $this->addUsingAlias(AddressPeer::ID, $address->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
开发者ID:dapepe,项目名称:tymio,代码行数:14,代码来源:BaseAddressQuery.php

示例10: updateAddress

 public function updateAddress(Address $address)
 {
     try {
         if ($address != null && ($address->getId() == null || $address->getId() == -1)) {
             return false;
         }
         if (!parent::getBdd()->inTransaction()) {
             parent::getBdd()->beginTransaction();
         }
         $query = "UPDATE ADDRESS SET line1 = :line1, line2 = :line2\n                      , zipcode = :zip, city = :city, latitude = :lat, longitude = :long\n                      WHERE id = :id";
         $request = parent::getBdd()->prepare($query);
         $request->bindParam(':id', $address->getId());
         if ($address->getLine1() != null) {
             $request->bindParam(':line1', $address->getLine1());
         } else {
             $request->bindValue(':line1', null);
         }
         if ($address->getLine2() != null) {
             $request->bindParam(':line2', $address->getLine2());
         } else {
             $request->bindValue(':line2', null);
         }
         if ($address->getZipCode() != null) {
             $request->bindParam(':zip', $address->getZipCode());
         } else {
             $request->bindValue(':zip', null);
         }
         if ($address->getCity() != null) {
             $request->bindParam(':city', $address->getCity());
         } else {
             $request->bindValue(':city', null);
         }
         $latLong = $this->googleMapService->getLatLong($address);
         if (sizeof($latLong) == 2) {
             $request->bindParam(':lat', $latLong[0]);
             $request->bindParam(':long', $latLong[1]);
         } else {
             $request->bindValue(':lat', null);
             $request->bindValue(':long', null);
         }
         $request->execute();
         parent::getBdd()->commit();
         $request->closeCursor();
         return true;
     } catch (Exception $e) {
         error_log($e->getMessage());
     }
     return false;
 }
开发者ID:alex148,项目名称:SmartMastore,代码行数:49,代码来源:AddressService.php


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