Skip to content

Commit a97d077

Browse files
committed
Add EntityDocument::copy
1 parent 5923189 commit a97d077

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/Entity/EntityDocument.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,15 @@ public function isEmpty();
6565
*/
6666
public function equals( EntityDocument $entity );
6767

68+
/**
69+
* Returns a deep clone of the entity. The clone must be equal in all details, including the id.
70+
* Since EntityDocuments are not immutable (at least the id can be set) the method is not
71+
* allowed to return $this.
72+
*
73+
* @since 5.0
74+
*
75+
* @return self
76+
*/
77+
public function copy();
78+
6879
}

0 commit comments

Comments
 (0)