https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39190
--- Comment #140 from Tomás Cohen Arazi (tcohen) <[email protected]> --- (In reply to Julian Maurice from comment #123) > I think that polymorphism (at the Koha::Object level) is not the best > solution here. I think the problem is that Koha::File::Transport tries to be > many things at once: it is a database entity and a file transporter. Those > are two very different things. We already have (to some extent) some other classes that could be considered polymorphic: * Background jobs: implement the `_derived_class` method i.e. we search for Koha::BackgroundJob objects then call `->derived_class()` in the caller. This happens in the 'workers' * IdP classes: implement the `upgrade_class` method. Only used for OAuth at the moment but other cases coming (I submitted CAS and Shibboleth classes) * Koha::Account::Line: doesn't implement an upgrade method, Koha::Account can be used with `credits()` and `debits()` to retrieve certain type with the appropriate object type. We might need to revisit them. Will keep thinking about it over the weekend. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
