DDC-665: new method: public function removeElements() {...} #818

Closed
opened 2026-01-22 12:51:36 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 3, 2010).

Jira issue originally created by user jellobird:

I suggest an additional convenience method

public function removeElements() { ... }

for these classes

Doctrine/ORM/PersistentCollection.php:    public function removeElement($element)
Doctrine/Common/Collections/ArrayCollection.php:    public function removeElement($element)
Doctrine/Common/Collections/Collection.php:    function removeElement($element);

to ommit calls like this:

foreach ($col AS $obj) {
    $col->removeElement($obj);
}
Originally created by @doctrinebot on GitHub (Jul 3, 2010). Jira issue originally created by user jellobird: I suggest an additional convenience method ``` public function removeElements() { ... } ``` for these classes ``` Doctrine/ORM/PersistentCollection.php: public function removeElement($element) Doctrine/Common/Collections/ArrayCollection.php: public function removeElement($element) Doctrine/Common/Collections/Collection.php: function removeElement($element); ``` to ommit calls like this: ``` foreach ($col AS $obj) { $col->removeElement($obj); } ```
admin added the New Feature label 2026-01-22 12:51:36 +01:00
admin closed this issue 2026-01-22 12:51:37 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 3, 2010):

Comment created by @beberlei:

Not an issue, DDC-555 fixed this issue

@doctrinebot commented on GitHub (Jul 3, 2010): Comment created by @beberlei: Not an issue, [DDC-555](http://www.doctrine-project.org/jira/browse/DDC-555) fixed this issue
Author
Owner

@doctrinebot commented on GitHub (Jul 3, 2010):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jul 3, 2010): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#818