public static function getInstance() {

        // late-static-bound class name
        $classname = get_called_class();
        if (!isset(self::$instances[$classname])) {
            self::$instances[$classname] = new static;
        }
        return self::$instances[$classname];
    }