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


PHP ArrayCollection::removeElement方法代码示例

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


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

示例1: removeDeputy

 /**
  * @param Deputy $deputy
  * @return HasDeputiesInterface
  */
 public function removeDeputy(Deputy $deputy)
 {
     if (true === $this->hasDeputy($deputy)) {
         $this->deputies->removeElement($deputy);
     }
     return $this;
 }
开发者ID:ministryofjustice,项目名称:opg-core-public-domain-model,代码行数:11,代码来源:HasDeputies.php

示例2: removeParcelResponse

 /**
  * @return $this
  */
 public function removeParcelResponse(ParcelResponse $parcelResponse)
 {
     if ($this->parcelResponses->contains($parcelResponse)) {
         $this->parcelResponses->removeElement($parcelResponse);
     }
     return $this;
 }
开发者ID:winzou,项目名称:tnt-express,代码行数:10,代码来源:Expedition.php

示例3: removeClosingBalance

 /**
  * @param \Opg\Core\Model\Entity\LineItem\LineItem $closingBalance
  * @return HasClosingBalances
  */
 public function removeClosingBalance(LineItem $closingBalance)
 {
     if ($this->closingBalanceExists($closingBalance)) {
         $this->closingBalances->removeElement($closingBalance);
     }
     return $this;
 }
开发者ID:ministryofjustice,项目名称:opg-core-public-domain-model,代码行数:11,代码来源:ClosingBalances.php

示例4: removeAsset

 /**
  * @param LineItem $asset
  * @return HasAssetLog
  */
 public function removeAsset(LineItem $asset)
 {
     if ($this->assetExists($asset)) {
         $this->assets->removeElement($asset);
     }
     return $this;
 }
开发者ID:ministryofjustice,项目名称:opg-core-public-domain-model,代码行数:11,代码来源:AssetLog.php

示例5: remove

 /**
  * @inheritdoc
  */
 public function remove(User $user)
 {
     if (!$this->collection->containsKey((string) $user->getId())) {
         throw new UserNotFoundException();
     }
     return $this->collection->removeElement($user);
 }
开发者ID:xtreamwayz,项目名称:zend-expressive-app-poc,代码行数:10,代码来源:InMemoryUserRepository.php

示例6: removeCourtFund

 /**
  * @param CourtFund $fund
  * @return HasCourtFundsInterface
  */
 public function removeCourtFund(CourtFund $fund)
 {
     if ($this->hasCourtFund($fund)) {
         $this->courtFunds->removeElement($fund);
     }
     return $this;
 }
开发者ID:ministryofjustice,项目名称:opg-core-public-domain-model,代码行数:11,代码来源:HasCourtFunds.php

示例7: removePost

 public function removePost(Post $post)
 {
     if ($this->posts->contains($post)) {
         $this->posts->removeElement($post);
     }
     return $this;
 }
开发者ID:artoodetoo,项目名称:BlogMVC,代码行数:7,代码来源:User.php

示例8: removeFee

 /**
  * @param Fees $fee
  * @return HasFeesInterface
  */
 public function removeFee(Fees $fee)
 {
     if (true === $this->hasFee($fee)) {
         $this->fees->removeElement($fee);
     }
     return $this;
 }
开发者ID:ministryofjustice,项目名称:opg-core-public-domain-model,代码行数:11,代码来源:HasFees.php

示例9: removePost

 public function removePost(Post $post)
 {
     if (!$this->hasPost($post)) {
         throw new DomainException('Post is not exists');
     }
     $this->posts->removeElement($post);
 }
开发者ID:nebuchar,项目名称:ddd-blog,代码行数:7,代码来源:User.php

示例10: undo

 /**
  * @param UndoableCommandInterface $cmd
  */
 public function undo(UndoableCommandInterface $cmd)
 {
     if ($this->history->removeElement($cmd) === false) {
         throw new CommandDispatcherException('Command is not executed, nothing to undo.');
     }
     $cmd->undo();
 }
开发者ID:stiggg,项目名称:command-dispatcher,代码行数:10,代码来源:Dispatcher.php

示例11: removeUser

 /**
  * @param FolderUser $user
  * @return $this
  */
 public function removeUser(FolderUser $user)
 {
     if ($this->hasUser($user)) {
         $this->Users->removeElement($user);
     }
     return $this;
 }
开发者ID:ChrisWesterfield,项目名称:MJR.ONE-CP,代码行数:11,代码来源:Folder.php

示例12: removeCategory

 /**
  * @param Category $category
  * @param bool $stopPropagation
  * @return $this
  */
 public function removeCategory(Category $category, $stopPropagation = false)
 {
     $this->categories->removeElement($category);
     if (!$stopPropagation) {
         $category->removeDocument($this, true);
     }
     return $this;
 }
开发者ID:saxulum,项目名称:saxulum-doctrine-mongodb-odm-manager-registry-provider,代码行数:13,代码来源:Document.php

示例13: removePermission

 public function removePermission($permission)
 {
     if (null === $permission || false === is_string($permission)) {
         trigger_error("removePermission expected Argument to be a string not null", E_USER_ERROR);
     }
     $this->permissions->removeElement($permission);
     return $this;
 }
开发者ID:bface007,项目名称:esgis_gabon,代码行数:8,代码来源:Module.php

示例14: removeSection

 /**
  * Remove a lesson from the section.
  *
  * @param Section $section
  *
  * @return $this
  */
 public function removeSection(Section $section)
 {
     if ($this->sections->contains($section)) {
         $this->sections->removeElement($section);
         $section->setLesson(null);
     }
     return $this;
 }
开发者ID:Elorfin,项目名称:MusicTools,代码行数:15,代码来源:Lesson.php

示例15: removeUser

 /**
  * @param User $user
  * @return bool
  */
 public function removeUser(User $user)
 {
     if ($this->hasUser($user)) {
         $this->Users->removeElement($user);
         return true;
     }
     return false;
 }
开发者ID:ChrisWesterfield,项目名称:MJR.ONE-CP,代码行数:12,代码来源:Group.php


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