]> git.koha-community.org Git - koha.git/commit
Bug 23893: Add new_from_api and set_from_api to Koha::Object
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 Nov 2019 19:07:03 +0000 (16:07 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Sat, 18 Jan 2020 15:59:35 +0000 (15:59 +0000)
commitd31ffed5a41db165194dc255e739b6c3c64bb237
treedc28ab7d49bb0510aa891d94bce371ab04b2f86a
parent1726c98c25a38dab545834160c8a7f7d0d519ea6
Bug 23893: Add new_from_api and set_from_api to Koha::Object

This patch introduces the following methods to the Koha::Object class:
- set_from_api
- new_from_api

This methods are going to be used when writing API controllers that map
to the attributes to the DB schema ones.

To test:
1. Apply this patchset
2. Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Koha/Object.pm