https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41728

--- Comment #6 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
(In reply to Jonathan Druart from comment #5)
> Wondering if this is not a good candidate for the Koha::Policy namespace.

The main reason I didn't use the Policy namespace is the return value i.e.
boolean (policy current) vs the aggregate class with many return values. It
felt odd to mix things. The return value is a hint: the policy checks validate
a rule, while the availability ones orchestrate many rules and return a complex
result.


We could move into something like:

```perl
Koha::Availability::Result          # Base result class
Koha::Policy::Checkin::Availability # Policy namespace, availability focus
Koha::Policy::Checkout::Availability

```

but I still feel having this clearly be item-centric is a plus.

If we wanted to replace (say) `CanBookBeReserved` we could do something like:

```perl
Koha::Biblio::Hold::Availability
```

which would internally instantiate the relevant `Koha::Policy::*` classes to
check things.

I'm open to ideas about this OFC.

-- 
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/

Reply via email to