mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-29 19:20:18 +02:00
re-add __clone
I re-added the `__clone` method which removed in the last commit.
This commit is contained in:
@@ -28,6 +28,13 @@ final class Singleton
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* prevent the instance from being cloned (which would create a second instance of it)
|
||||
*/
|
||||
private function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* prevent from being unserialized (which would create a second instance of it)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user