protected static function getFactory() { if (!static::$factory instanceof Factory) { static::$factory = new Factory(); } return static::$factory; }