function getInstance() { if (!isset(self::$instance[get_class()])) { self::$instance = new Attachments(); } return self::$instance; }