public function copy()
    {
        $list = [];
        foreach ($this->getIterator() as $key => $value) {
            $list[$key] = \is_object($value) ? clone $value : $value;
        }

        return $this->createFrom($list);
    }
public function copy()
    {
        $list = [];
        foreach ($this->getIterator() as $key => $value) {
            $list[$key] = \is_object($value) ? clone $value : $value;
        }

        return $this->createFrom($list);
    }
public function copy ( ) { $ list = [ ] ; foreach ( $ this -> getIterator ( ) as $ key => $ value ) { $ list [ $ key ] = \ is_object ( $ value ) ? clone $ value : $ value ; } return $ this -> createFrom ( $ list ) ; }
Create a copy from this collection by cloning all objects in the collection.

@return static
Create a copy from this collection by cloning all objects in the collection .