/** * Returns true if this collection contains all of the elements in the specified collection. * @param Collection $collection * @return boolean */ public function containsAll(CollectionInterface $collection) { $iterator = $collection->iterator(); while ($iterator->hasNext()) { if (!$this->contains($iterator->next())) { return false; } } return true; }