[Koha-devel] Helper/Static methods for objects

dcook at prosentient.com.au dcook at prosentient.com.au
Mon Jul 19 02:00:27 CEST 2021


Thanks, Nick.

 

I added a comment on 20817 about why I think static/class methods are preferable to a Util module.

 

Cheers,

 

David Cook

Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

From: Koha-devel <koha-devel-bounces at lists.koha-community.org> On Behalf Of Nick Clemens
Sent: Saturday, 17 July 2021 5:20 AM
To: Koha Devel <koha-devel at lists.koha-community.org>
Subject: [Koha-devel] Helper/Static methods for objects

 

Hi All,

 

On two different bugs we have run into similar issues where a method was needed that didn't use the object directly.

 

On bug 28709 I proposed checking the ref of $self to see if this was called via the object - David Cook proposed adding a second method that is always called directly and calling that from the object method

 

On bug 20817 Kyle proposed a Koha::Util::Acquisition class and we could utilize that for other object as well, e.g. Koha::Util::Biblio, Koha::Util::Item

 

I put this on the agenda for the next dev meeting, I am sending it out here to get opinions and encourage attendance at that meeting to vote on a path forward.

 

-Nick

 

 

 


-- 

Nick Clemens

ByWater Solutions

bywatersolutions.com <http://bywatersolutions.com>  

Phone: (888) 900-8944

Pronouns: (he/him/his)
Timezone: Eastern



Follow us:

 <https://www.facebook.com/ByWaterSolutions/>   <https://www.instagram.com/bywatersolutions/>   <https://www.youtube.com/user/bywatersolutions>   <https://twitter.com/ByWaterSolution> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210719/48064a71/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD0001.jpg
Type: image/jpeg
Size: 823 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210719/48064a71/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 435 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210719/48064a71/attachment-0001.jpg>


More information about the Koha-devel mailing list