Singleton refers to the class of generative patterns. It is used to create just one instance of the class, and ensures that no second one appears while the program is running. For example, in the MVC scheme, often this pattern is used to generate the main controller.
trait TSingleton { private static $instanse; private function __construct() { } public static function getInstance() { if(self::$instanse === null){ self::$instanse = new self(); } return self::$instanse; } }