<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Thanks, Nick.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I added a comment on 20817 about why I think static/class methods are preferable to a Util module.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Software Engineer<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>Suite 7.03<o:p></o:p></p><p class=MsoNormal>6a Glen St<o:p></o:p></p><p class=MsoNormal>Milsons Point NSW 2061<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Koha-devel <koha-devel-bounces@lists.koha-community.org> <b>On Behalf Of </b>Nick Clemens<br><b>Sent:</b> Saturday, 17 July 2021 5:20 AM<br><b>To:</b> Koha Devel <koha-devel@lists.koha-community.org><br><b>Subject:</b> [Koha-devel] Helper/Static methods for objects<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Hi All,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>On two different bugs we have run into similar issues where a method was needed that didn't use the object directly.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>-Nick<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><br>-- <o:p></o:p></p><div><div><div><div><div><div><div><div><p class=MsoNormal>Nick Clemens<o:p></o:p></p></div><div><p class=MsoNormal>ByWater Solutions<o:p></o:p></p></div><div><p class=MsoNormal><a href="http://bywatersolutions.com" target="_blank">bywatersolutions.com</a> <o:p></o:p></p></div></div><p class=MsoNormal>Phone: (888) 900-8944<o:p></o:p></p></div><div><p class=MsoNormal>Pronouns: (he/him/his)<br>Timezone: Eastern<o:p></o:p></p></div><div><p class=MsoNormal><span style='border:solid windowtext 1.0pt;padding:0cm'><img border=0 width=183 height=48 style='width:1.9062in;height:.5in' id="Picture_x0020_1" src="cid:image001.jpg@01D77C84.E6212C60" alt="Image removed by sender."></span><o:p></o:p></p><div><div><p class=MsoNormal>Follow us:<o:p></o:p></p></div><p class=MsoNormal><a href="https://www.facebook.com/ByWaterSolutions/" target="_blank"><span style='border:solid windowtext 1.0pt;padding:0cm;text-decoration:none'><img border=0 width=100 height=100 style='width:1.0416in;height:1.0416in' id="Picture_x0020_2" src="cid:~WRD0001.jpg" alt="Image removed by sender."></span></a> <a href="https://www.instagram.com/bywatersolutions/" target="_blank"><span style='border:solid windowtext 1.0pt;padding:0cm;text-decoration:none'><img border=0 width=100 height=100 style='width:1.0416in;height:1.0416in' id="Picture_x0020_3" src="cid:~WRD0001.jpg" alt="Image removed by sender."></span></a> <a href="https://www.youtube.com/user/bywatersolutions" target="_blank"><span style='border:solid windowtext 1.0pt;padding:0cm;text-decoration:none'><img border=0 width=100 height=100 style='width:1.0416in;height:1.0416in' id="Picture_x0020_4" src="cid:~WRD0001.jpg" alt="Image removed by sender."></span></a> <a href="https://twitter.com/ByWaterSolution" target="_blank"><span style='border:solid windowtext 1.0pt;padding:0cm;text-decoration:none'><img border=0 width=100 height=100 style='width:1.0416in;height:1.0416in' id="Picture_x0020_5" src="cid:~WRD0001.jpg" alt="Image removed by sender."></span></a><o:p></o:p></p></div></div></div></div></div></div></div></div></div></div></body></html>