當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Attribute::getId方法代碼示例

本文整理匯總了PHP中Attribute::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attribute::getId方法的具體用法?PHP Attribute::getId怎麽用?PHP Attribute::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Attribute的用法示例。


在下文中一共展示了Attribute::getId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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->aCategory !== null && $this->category_id !== $this->aCategory->getId()) {
         $this->aCategory = null;
     }
     if ($this->aAttribute !== null && $this->attribute_id !== $this->aAttribute->getId()) {
         $this->aAttribute = null;
     }
 }
開發者ID:thelia-modules,項目名稱:CriteriaSearch,代碼行數:22,代碼來源:CriteriaSearchCategoryAttribute.php

示例2: 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->aCartItem !== null && $this->cart_item_id !== $this->aCartItem->getId()) {
         $this->aCartItem = null;
     }
     if ($this->aAttribute !== null && $this->attribute_id !== $this->aAttribute->getId()) {
         $this->aAttribute = null;
     }
     if ($this->aAttributeAv !== null && $this->attribute_av_id !== $this->aAttributeAv->getId()) {
         $this->aAttributeAv = null;
     }
 }
開發者ID:bcbrr,項目名稱:LegacyProductAttributes,代碼行數:25,代碼來源:LegacyCartItemAttributeCombination.php

示例3: addAttribute

 public function addAttribute(Attribute $attribute)
 {
     $this->attributes[$attribute->getId()] = $attribute;
 }
開發者ID:kniffo80,項目名稱:Genisys,代碼行數:4,代碼來源:AttributeMap.php


注:本文中的Attribute::getId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。