]> 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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 8 Jan 2020 14:38:28 +0000 (14:38 +0000)
commit340f77732a82d368cdafc622ae636bff19f997af
treea0e9628e8f1583655a64868905cbaa001b854927
parentb9af3d71b130ed72db899a9191249d9bc9505ec6
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>
Koha/Object.pm