protected static function getDb() { $model = get_called_class(); if (!isset(self::$links[$model])) { self::$links[$model] = (new static())->db(); } return self::$links[$model]; }