[Koha-bugs] [Bug 13019] Add base classes on which to build Koha objects

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 7 17:09:28 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13019

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32009|0                           |1
        is obsolete|                            |

--- Comment #11 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 32042
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32042&action=edit
Bug 13019 - Add base classes on which to build Koha objects

The idea behind this is to have a pair of base classes on which to build
our new generation of Koha objects. Koha::Object is a base class, which
in it's most basic form, is to represent a row in a table. For example,
Koha::Borrower inherits from Koha::Object. So too could Koha::Biblio
and Koha::Item for example.

Koha::Objects is to represent a way to fetch and manipulate sets of
objects. For example, Koha::Borrowers has a method to get a
Koha::Borrower object by id and a method to search for an get a list
of Koha::Borrower objects. Right now Koha::Objects has only the
essentials but can easily be extended and those enhancements will be
passed down to all the child classes based on it.

By using these classes as a base, we will add consistency to our
code, allow us to keep our code DRY, reduce bugs, and encapsulate our
database access among other benefits.

Test Plan:
1) Apply this patch
2) prove t/Object.t t/db_dependent/Object.t t/db_dependent/Objects.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list