This is a demonstration of the possibility to refactor parts of Koha into a modular design. The idea is to make use of class inheritance and method overrides to make it possible for a library to use only the parts of Koha that are relevant. It is possible to do this whilst maintaining the full compatibility of the community version, and hopefully it could help in refactoring into a more stable, maintanable and pluggable core.
Created attachment 78544 [details] [review] Add Core::Main Namespace - Core::Exceptions - Core::Prefs This is the main class of Core, along with siblings Prefs, to handle sysprefs and overrides, as well as Exceptions. Also included are the Makefile and koha-conf setup
Created attachment 78545 [details] [review] Add Core::Circulation This is the Circulation child of Core. It is a work in progress, but ideally all neccessary subfunctions should be overridable, and it should consist of a bare minimum of functionality for handling circulation.
Created attachment 78546 [details] [review] Add crude Core::Community::Circulation This is the Community subclass of Circulation that should be run as default to handle the basic Circulation, and should be interchangable with todays functionality.
Created attachment 78547 [details] [review] Implement Core::Circulation in admin and SIP covered: C4::SIP::ILS::Transaction::Checkin->do_checkin C4::SIP::ILS::Transaction::Checkout->do_checkout C4::SIP::Sip::MsgType->handle_checkout (add branch) circ/circulation.pl circ/renew.pl circ/returns.pl
Created attachment 78549 [details] [review] Bug 21327: Add Core::Main Namespace - Core::Exceptions - Core::Prefs This is the main class of Core, along with siblings Prefs - to handle sysprefs and overrides, as well as Exceptions - Also included are the Makefile and koha-conf setup
Created attachment 78550 [details] [review] Bug 21327: Add Core::Circulation This is the Circulation subclass of Core. It is a work in progress, but ideally all neccessary subfunctions should be overridable, and it should consist of a bare minimum of functionality for handling circulation. It is a rewrite of C4::Circulation. To use, add this in the config section in koha-conf.xml and restart plack: <core_modules> <circulation>Core::Circulation</circulation> </core_modules>
Created attachment 78551 [details] [review] Bug 21327: Add Core::Community::Circulation This is the Community subclass of Circulation that should be run as default to handle the basic Circulation, and should be interchangable with today's functionality. It also adds SIP integration. to use, add the following in the config section of koha-conf.xml: <core_modules> <circulation>Core::Community::Circulation</circulation> <sip>Core::Community::Circulation::SIP</sip> </core_modules> This is also the default if not set.
Created attachment 78552 [details] [review] Bug 21327: Implement Core::Circulation in admin and SIP covered: C4::SIP::ILS::Transaction::Checkin->do_checkin C4::SIP::ILS::Transaction::Checkout->do_checkout C4::SIP::Sip::MsgType->handle_checkout (add branch) circ/circulation.pl circ/renew.pl circ/returns.pl