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


PHP Country::getId方法代码示例

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


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

示例1: ensureConsistency

 /**
  * Checks and repairs the internal consistency of the object.
  *
  * This method is executed after an already-instantiated object is re-hydrated
  * from the database.  It exists to check any foreign keys to make sure that
  * the objects related to the current object are correct based on foreign key.
  *
  * You can override this method in the stub class, but you should always invoke
  * the base method from the overridden method (i.e. parent::ensureConsistency()),
  * in case your model changes.
  *
  * @throws PropelException
  */
 public function ensureConsistency()
 {
     if ($this->aCountry !== null && $this->default_country_id !== $this->aCountry->getId()) {
         $this->aCountry = null;
     }
     if ($this->aCurrency !== null && $this->default_currency_id !== $this->aCurrency->getId()) {
         $this->aCurrency = null;
     }
 }
开发者ID:Mertiozys,项目名称:GoogleShopping,代码行数:22,代码来源:GoogleshoppingAccount.php

示例2: getCountries

 /**
  * 
  * @return multitype:Country creates an array of all the data a country has.
  */
 public static function getCountries()
 {
     $countries = array();
     $country = new Country();
     $country->setId(1);
     $country->setName('America');
     $countries[$country->getId()] = $country;
     $country2 = new Country();
     $country2->setId(2);
     $country2->setname('Germany');
     $countries[$country2->getId()] = $country2;
     return $countries;
 }
开发者ID:piiskop,项目名称:pstk,代码行数:17,代码来源:Country.php

示例3: prune

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

示例4: ensureConsistency

 /**
  * Checks and repairs the internal consistency of the object.
  *
  * This method is executed after an already-instantiated object is re-hydrated
  * from the database.  It exists to check any foreign keys to make sure that
  * the objects related to the current object are correct based on foreign key.
  *
  * You can override this method in the stub class, but you should always invoke
  * the base method from the overridden method (i.e. parent::ensureConsistency()),
  * in case your model changes.
  *
  * @throws PropelException
  */
 public function ensureConsistency()
 {
     if ($this->aCustomerTitle !== null && $this->title_id !== $this->aCustomerTitle->getId()) {
         $this->aCustomerTitle = null;
     }
     if ($this->aCountry !== null && $this->country_id !== $this->aCountry->getId()) {
         $this->aCountry = null;
     }
 }
开发者ID:ThomasArnaud,项目名称:SoColissimo,代码行数:22,代码来源:AddressSocolissimo.php

示例5: testGetSetId

 public function testGetSetId()
 {
     $this->country->setId('GBR');
     $this->assertEquals('GBR', $this->country->getId());
 }
开发者ID:delboy1978uk,项目名称:country,代码行数:5,代码来源:CountryTest.php

示例6: 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      Country $obj A Country 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
         self::$instances[$key] = $obj;
     }
 }
开发者ID:homer6,项目名称:blank_altumo,代码行数:22,代码来源:BaseCountryPeer.php

示例7: assertPreConditions

 protected function assertPreConditions()
 {
     $this->assertInstanceOf('JLM\\DailyBundle\\Model\\PartFamilyInterface', $this->entity);
     $this->assertNull($this->entity->getId());
     $this->assertNull($this->entity->getName());
 }
开发者ID:jlm-entreprise,项目名称:daily-bundle,代码行数:6,代码来源:PartFamilyTest.php

示例8: setCountry

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

示例9: assertPreConditions

 /**
  * {@inheritdoc}
  */
 protected function assertPreConditions()
 {
     $this->assertInstanceOf('JLM\\ContractBundle\\Model\\ContractInterface', $this->entity);
     $this->assertNull($this->entity->getId());
 }
开发者ID:jlm-entreprise,项目名称:contract-bundle,代码行数:8,代码来源:ContractTest.php

示例10: ensureConsistency

 /**
  * Checks and repairs the internal consistency of the object.
  *
  * This method is executed after an already-instantiated object is re-hydrated
  * from the database.  It exists to check any foreign keys to make sure that
  * the objects related to the current object are correct based on foreign key.
  *
  * You can override this method in the stub class, but you should always invoke
  * the base method from the overridden method (i.e. parent::ensureConsistency()),
  * in case your model changes.
  *
  * @throws PropelException
  */
 public function ensureConsistency()
 {
     if ($this->aCountry !== null && $this->country_id !== $this->aCountry->getId()) {
         $this->aCountry = null;
     }
 }
开发者ID:Asturyan,项目名称:SalesLocations,代码行数:19,代码来源:SalesLocations.php


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