Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
class Singleton(object):
"""
Singleton design pattern.
"""
_instance = None
def __init__(self):
if self.__class__ is Singleton:
raise TypeError("Cannot instantiate directly.")
@classmethod
def get_instance(cls):
"""Get the class instance."""
if cls._instance is None:
cls._instance = cls()
return cls._instance