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


PHP ObjectCollection::clear方法代碼示例

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


在下文中一共展示了ObjectCollection::clear方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: removePlayers

 /**
  * @param  ChildPlayers $players The ChildPlayers object to remove.
  * @return $this|ChildMlbTeamRef The current object (for fluent API support)
  */
 public function removePlayers(ChildPlayers $players)
 {
     if ($this->getPlayerss()->contains($players)) {
         $pos = $this->collPlayerss->search($players);
         $this->collPlayerss->remove($pos);
         if (null === $this->playerssScheduledForDeletion) {
             $this->playerssScheduledForDeletion = clone $this->collPlayerss;
             $this->playerssScheduledForDeletion->clear();
         }
         $this->playerssScheduledForDeletion[] = $players;
         $players->setMlbTeamRef(null);
     }
     return $this;
 }
開發者ID:scornfield,項目名稱:StrayAdmin,代碼行數:18,代碼來源:MlbTeamRef.php

示例2: removeRigAttributeValue

 /**
  * @param  ChildRigAttributeValue $rigAttributeValue The ChildRigAttributeValue object to remove.
  * @return $this|ChildRigAttribute The current object (for fluent API support)
  */
 public function removeRigAttributeValue(ChildRigAttributeValue $rigAttributeValue)
 {
     if ($this->getRigAttributeValues()->contains($rigAttributeValue)) {
         $pos = $this->collRigAttributeValues->search($rigAttributeValue);
         $this->collRigAttributeValues->remove($pos);
         if (null === $this->rigAttributeValuesScheduledForDeletion) {
             $this->rigAttributeValuesScheduledForDeletion = clone $this->collRigAttributeValues;
             $this->rigAttributeValuesScheduledForDeletion->clear();
         }
         $this->rigAttributeValuesScheduledForDeletion[] = clone $rigAttributeValue;
         $rigAttributeValue->setRigAttribute(null);
     }
     return $this;
 }
開發者ID:pcmasteratings,項目名稱:site,代碼行數:18,代碼來源:RigAttribute.php

示例3: removeBook

 /**
  * @param  ChildBook $book The ChildBook object to remove.
  * @return $this|ChildPublisher The current object (for fluent API support)
  */
 public function removeBook(ChildBook $book)
 {
     if ($this->getBooks()->contains($book)) {
         $pos = $this->collBooks->search($book);
         $this->collBooks->remove($pos);
         if (null === $this->booksScheduledForDeletion) {
             $this->booksScheduledForDeletion = clone $this->collBooks;
             $this->booksScheduledForDeletion->clear();
         }
         $this->booksScheduledForDeletion[] = clone $book;
         $book->setPublisher(null);
     }
     return $this;
 }
開發者ID:jeffblack360,項目名稱:testpropel,代碼行數:18,代碼來源:Publisher.php

示例4: removeFitEntry

 /**
  * @param  ChildFitEntry $fitEntry The ChildFitEntry object to remove.
  * @return $this|ChildFitEntryType The current object (for fluent API support)
  */
 public function removeFitEntry(ChildFitEntry $fitEntry)
 {
     if ($this->getFitEntries()->contains($fitEntry)) {
         $pos = $this->collFitEntries->search($fitEntry);
         $this->collFitEntries->remove($pos);
         if (null === $this->fitEntriesScheduledForDeletion) {
             $this->fitEntriesScheduledForDeletion = clone $this->collFitEntries;
             $this->fitEntriesScheduledForDeletion->clear();
         }
         $this->fitEntriesScheduledForDeletion[] = clone $fitEntry;
         $fitEntry->setFitEntryType(null);
     }
     return $this;
 }
開發者ID:Covert-Inferno,項目名稱:EVE-Composition-Planer,代碼行數:18,代碼來源:FitEntryType.php

示例5: removeLanguage

 /**
  * @param  ChildLanguage $language The ChildLanguage object to remove.
  * @return $this|ChildLanguageType The current object (for fluent API support)
  */
 public function removeLanguage(ChildLanguage $language)
 {
     if ($this->getLanguages()->contains($language)) {
         $pos = $this->collLanguages->search($language);
         $this->collLanguages->remove($pos);
         if (null === $this->languagesScheduledForDeletion) {
             $this->languagesScheduledForDeletion = clone $this->collLanguages;
             $this->languagesScheduledForDeletion->clear();
         }
         $this->languagesScheduledForDeletion[] = $language;
         $language->setType(null);
     }
     return $this;
 }
開發者ID:keeko,項目名稱:core,代碼行數:18,代碼來源:LanguageType.php

示例6: removeType

 /**
  * @param  ChildRegionType $type The ChildRegionType object to remove.
  * @return $this|ChildRegionArea The current object (for fluent API support)
  */
 public function removeType(ChildRegionType $type)
 {
     if ($this->getTypes()->contains($type)) {
         $pos = $this->collTypes->search($type);
         $this->collTypes->remove($pos);
         if (null === $this->typesScheduledForDeletion) {
             $this->typesScheduledForDeletion = clone $this->collTypes;
             $this->typesScheduledForDeletion->clear();
         }
         $this->typesScheduledForDeletion[] = clone $type;
         $type->setArea(null);
     }
     return $this;
 }
開發者ID:keeko,項目名稱:core,代碼行數:18,代碼來源:RegionArea.php

示例7: removeExpertGroupMembers

 /**
  * @param  ChildExpertGroupMembers $expertGroupMembers The ChildExpertGroupMembers object to remove.
  * @return $this|ChildExpertGroup The current object (for fluent API support)
  */
 public function removeExpertGroupMembers(ChildExpertGroupMembers $expertGroupMembers)
 {
     if ($this->getExpertGroupMemberss()->contains($expertGroupMembers)) {
         $pos = $this->collExpertGroupMemberss->search($expertGroupMembers);
         $this->collExpertGroupMemberss->remove($pos);
         if (null === $this->expertGroupMemberssScheduledForDeletion) {
             $this->expertGroupMemberssScheduledForDeletion = clone $this->collExpertGroupMemberss;
             $this->expertGroupMemberssScheduledForDeletion->clear();
         }
         $this->expertGroupMemberssScheduledForDeletion[] = clone $expertGroupMembers;
         $expertGroupMembers->setExpertGroup(null);
     }
     return $this;
 }
開發者ID:menace690,項目名稱:Blue-Economics,代碼行數:18,代碼來源:ExpertGroup.php

示例8: removeUserAttributeValues

 /**
  * @param  ChildUserAttributeValues $userAttributeValues The ChildUserAttributeValues object to remove.
  * @return $this|ChildUserAttributes The current object (for fluent API support)
  */
 public function removeUserAttributeValues(ChildUserAttributeValues $userAttributeValues)
 {
     if ($this->getUserAttributeValuess()->contains($userAttributeValues)) {
         $pos = $this->collUserAttributeValuess->search($userAttributeValues);
         $this->collUserAttributeValuess->remove($pos);
         if (null === $this->userAttributeValuessScheduledForDeletion) {
             $this->userAttributeValuessScheduledForDeletion = clone $this->collUserAttributeValuess;
             $this->userAttributeValuessScheduledForDeletion->clear();
         }
         $this->userAttributeValuessScheduledForDeletion[] = clone $userAttributeValues;
         $userAttributeValues->setUserAttributes(null);
     }
     return $this;
 }
開發者ID:nirkbirk,項目名稱:site,代碼行數:18,代碼來源:UserAttributes.php

示例9: removeStock

 /**
  * @param  ChildStock $stock The ChildStock object to remove.
  * @return $this|ChildUnit The current object (for fluent API support)
  */
 public function removeStock(ChildStock $stock)
 {
     if ($this->getStocks()->contains($stock)) {
         $pos = $this->collStocks->search($stock);
         $this->collStocks->remove($pos);
         if (null === $this->stocksScheduledForDeletion) {
             $this->stocksScheduledForDeletion = clone $this->collStocks;
             $this->stocksScheduledForDeletion->clear();
         }
         $this->stocksScheduledForDeletion[] = $stock;
         $stock->setUnit(null);
     }
     return $this;
 }
開發者ID:AlvaCorp,項目名稱:POS-2,代碼行數:18,代碼來源:Unit.php

示例10: removeInvMetaTypes

 /**
  * @param  ChildInvMetaTypes $invMetaTypes The ChildInvMetaTypes object to remove.
  * @return $this|ChildInvMetaGroups The current object (for fluent API support)
  */
 public function removeInvMetaTypes(ChildInvMetaTypes $invMetaTypes)
 {
     if ($this->getInvMetaTypess()->contains($invMetaTypes)) {
         $pos = $this->collInvMetaTypess->search($invMetaTypes);
         $this->collInvMetaTypess->remove($pos);
         if (null === $this->invMetaTypessScheduledForDeletion) {
             $this->invMetaTypessScheduledForDeletion = clone $this->collInvMetaTypess;
             $this->invMetaTypessScheduledForDeletion->clear();
         }
         $this->invMetaTypessScheduledForDeletion[] = clone $invMetaTypes;
         $invMetaTypes->setInvMetaGroups(null);
     }
     return $this;
 }
開發者ID:Covert-Inferno,項目名稱:EVE-Composition-Planer,代碼行數:18,代碼來源:InvMetaGroups.php

示例11: removeGroupAccess

 /**
  * @param  ChildGroupAccess $groupAccess The ChildGroupAccess object to remove.
  * @return $this|ChildEntityType The current object (for fluent API support)
  */
 public function removeGroupAccess(ChildGroupAccess $groupAccess)
 {
     if ($this->getGroupAccesses()->contains($groupAccess)) {
         $pos = $this->collGroupAccesses->search($groupAccess);
         $this->collGroupAccesses->remove($pos);
         if (null === $this->groupAccessesScheduledForDeletion) {
             $this->groupAccessesScheduledForDeletion = clone $this->collGroupAccesses;
             $this->groupAccessesScheduledForDeletion->clear();
         }
         $this->groupAccessesScheduledForDeletion[] = clone $groupAccess;
         $groupAccess->setEntityType(null);
     }
     return $this;
 }
開發者ID:Covert-Inferno,項目名稱:EVE-Composition-Planer,代碼行數:18,代碼來源:EntityType.php

示例12: removeTeams

 /**
  * @param  ChildTeams $teams The ChildTeams object to remove.
  * @return $this|ChildLeagueRef The current object (for fluent API support)
  */
 public function removeTeams(ChildTeams $teams)
 {
     if ($this->getTeamss()->contains($teams)) {
         $pos = $this->collTeamss->search($teams);
         $this->collTeamss->remove($pos);
         if (null === $this->teamssScheduledForDeletion) {
             $this->teamssScheduledForDeletion = clone $this->collTeamss;
             $this->teamssScheduledForDeletion->clear();
         }
         $this->teamssScheduledForDeletion[] = $teams;
         $teams->setLeagueRef(null);
     }
     return $this;
 }
開發者ID:scornfield,項目名稱:StrayAdmin,代碼行數:18,代碼來源:LeagueRef.php

示例13: removeApplication

 /**
  * @param  ChildApplication $application The ChildApplication object to remove.
  * @return $this|ChildStudent The current object (for fluent API support)
  */
 public function removeApplication(ChildApplication $application)
 {
     if ($this->getApplications()->contains($application)) {
         $pos = $this->collApplications->search($application);
         $this->collApplications->remove($pos);
         if (null === $this->applicationsScheduledForDeletion) {
             $this->applicationsScheduledForDeletion = clone $this->collApplications;
             $this->applicationsScheduledForDeletion->clear();
         }
         $this->applicationsScheduledForDeletion[] = clone $application;
         $application->setStudent(null);
     }
     return $this;
 }
開發者ID:nstojanovickg,項目名稱:diplomski,代碼行數:18,代碼來源:Student.php

示例14: removeRole

 /**
  * Remove role of this object
  * through the user_role cross reference table.
  *
  * @param ChildRole $role
  * @return ChildUser The current object (for fluent API support)
  */
 public function removeRole(ChildRole $role)
 {
     if ($this->getRoles()->contains($role)) {
         $userRole = new ChildUserRole();
         $userRole->setRole($role);
         if ($role->isUsersLoaded()) {
             //remove the back reference if available
             $role->getUsers()->removeObject($this);
         }
         $userRole->setUser($this);
         $this->removeUserRole(clone $userRole);
         $userRole->clear();
         $this->collRoles->remove($this->collRoles->search($role));
         if (null === $this->rolesScheduledForDeletion) {
             $this->rolesScheduledForDeletion = clone $this->collRoles;
             $this->rolesScheduledForDeletion->clear();
         }
         $this->rolesScheduledForDeletion->push($role);
     }
     return $this;
 }
開發者ID:phpalchemy,項目名稱:cerberus,代碼行數:28,代碼來源:User.php

示例15: removeUser

 /**
  * Remove user of this object
  * through the user_group cross reference table.
  *
  * @param ChildUser $user
  * @return ChildGroup The current object (for fluent API support)
  */
 public function removeUser(ChildUser $user)
 {
     if ($this->getUsers()->contains($user)) {
         $userGroup = new ChildUserGroup();
         $userGroup->setUser($user);
         if ($user->isGroupsLoaded()) {
             //remove the back reference if available
             $user->getGroups()->removeObject($this);
         }
         $userGroup->setGroup($this);
         $this->removeUserGroup(clone $userGroup);
         $userGroup->clear();
         $this->collUsers->remove($this->collUsers->search($user));
         if (null === $this->usersScheduledForDeletion) {
             $this->usersScheduledForDeletion = clone $this->collUsers;
             $this->usersScheduledForDeletion->clear();
         }
         $this->usersScheduledForDeletion->push($user);
     }
     return $this;
 }
開發者ID:xfreddiex,項目名稱:code-sharer,代碼行數:28,代碼來源:Group.php


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