Added a 'clone part' function.

This commit is contained in:
Jan Böhmer 2019-03-19 19:53:23 +01:00
parent 33631f16cf
commit 10f39b7f45
7 changed files with 87 additions and 16 deletions

View file

@ -56,6 +56,7 @@ abstract class DBElement
return (int) $this->id;
}
/**
* Returns the ID as an string, defined by the element class.
* This should have a form like P000014, for a part with ID 14.
@ -63,4 +64,10 @@ abstract class DBElement
*/
abstract public function getIDString() : string;
public function __clone()
{
//Set ID to null, so that an new entry is created
$this->id = null;
}
}