interface ClonableInterface (View source)

Provide an interface that allow to get a deep clone of an object

Methods

$this
__clone()

PHP magic method

$this
newClone(boolean $deep = false)

Create clone of the instance

Details

$this __clone()

PHP magic method

Return Value

$this

$this newClone(boolean $deep = false)

Create clone of the instance

Parameters

boolean $deep If FALSE, the method MUST produce the same object than the __clone() magic method. If TRUE, the method MAY return a deep copy of the instance.

Return Value

$this Instance clone