getInstance() getInstance() : $this Return the current instance. If instance doesn't exist, a new instance will be created. Returns $this
unserialize() unserialize(string $string) : array|mixed Unserializes the given string and returns the array. Parameters string $string String to serialize. Returns array|mixed
init() init() Override this if you wish to do some stuff once the singleton instance has been created.
__construct() __construct() The constructor is set to private to prevent creating new instances. If you want to fire a function after the singleton instance is created, just implement 'init' method into your class.