/** * Singleton pattern * * @return class Singleton instance */ public static function getInstance($parent) { if (!self::$_instance) { self::$_instance = new self($parent); } return self::$_instance; }