Lines Matching refs:copy
8 …oads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/mycl…
46 composer require myclabs/deep-copy
55 $myCopy = $copier->copy($myObject);
91 ![With DeepCopy](doc/deep-copy.png)
104 $copy = deep_copy($var);
114 $copy = $copier->copy($var);
117 You may want to roll your own deep copy function:
132 return $copier->copy($var);
139 You can add filters to customize the copy process.
199 …ple that you are copying a database record (or a Doctrine entity), so you want the copy not to have
213 $copy = $copier->copy($object);
215 echo $copy->id; // null
231 $copy = $copier->copy($object);
232 // $copy->category has not been touched
238 If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
248 $copy = $copier->copy($object);
254 If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be rese…
265 $copy = $copier->copy($object);
267 // $copy->myProperty will return an empty collection
287 $copy = $copier->copy($object);
289 // $copy should now contain a clone of all entities, including those that were not yet fully loaded.
304 return $currentValue . ' (copy)'
308 $copy = $copier->copy($object);
310 // $copy->title will contain the data returned by the callback, e.g. 'The title (copy)'
326 $copy = $copier->copy([new MyClass, 'some string', new MyClass]);
328 // $copy will contain ['MyClass', 'some string', 'MyClass']