Hi all, I'm also in favor of simple functions with few arguments. If we really need something more complex then just write a wrapper around the simple ones. I know nothing about that particular function though…
Cheers, 2014-09-22 1:59 GMT+02:00 Marcos García <marcos...@gmail.com>: > But what is the problem with having an string or and array in the same > argument? An is_array check should be made but I think that is more > comfortable than using 2 params... Another way could be using > setEventMessage for string and setEventMessages for a set of strings... > > Regards, > > > *Marcos García* > > marcos...@gmail.com > > > 2014-09-22 1:08 GMT+02:00 Destailleur Laurent <e...@destailleur.fr>: > >> If you do so, you must provide a string XOR an array. >> In past only string was used. More and more we try to store errors into >> array. >> But for a transition need, we need both parameters (a lot of part of >> code currently store error into string AND other errors into array). >> So we need to provide both type at same time to function. >> >> 2014-09-22 1:00 GMT+02:00 Marcos García <marcos...@gmail.com>: >> > Hi: >> > >> > I've noticed that setEventMessage is now a deprecated function and >> > setEventMessages should be used instead. >> > >> > Its signature is >> > function setEventMessages($mesg, $mesgs, $style='mesgs') >> > where $mesg is for a string and $mesgs is filled when we want to attach >> an >> > array of messages. >> > >> > My question is... why doing this and not doing a setEventMessage where >> the >> > first param can be either an array or a string? I must say I don't >> really >> > like functions that act differently depending on 1st or 2nd param >> filled. >> > >> > Regards, >> > >> > >> > Marcos García >> > >> > marcos...@gmail.com >> > >> > >> > _______________________________________________ >> > Dolibarr-dev mailing list >> > Dolibarr-dev@nongnu.org >> > https://lists.nongnu.org/mailman/listinfo/dolibarr-dev >> > >> >> >> >> -- >> Laurent Destailleur (alias Eldy) >> >> ------------------------------------------------------------------------------------ >> Social networks of my OpenSource projects: >> Dolibarr Google+: https://plus.google.com/+DolibarrOrg/ >> Dolibarr Facebook: https://www.facebook.com/dolibarr >> Dolibarr Twitter: http://www.twitter.com/dolibarr >> AWStats Google+: https://plus.google.com/+AWStatsOrgPoject/ >> AWStats Facebook: https://www.facebook.com/awstats.org >> AWStats Twitter: http://www.twitter.com/awstats_project >> >> _______________________________________________ >> Dolibarr-dev mailing list >> Dolibarr-dev@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev >> > > > _______________________________________________ > Dolibarr-dev mailing list > Dolibarr-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/dolibarr-dev > > -- *Raphaël Doursenaud* Directeur technique (CTO) Expert certifié en déploiement Google Apps <https://gpcsolutions.fr/raphael-doursenaud-google-apps-certified-deployment-specialist> +33 (0)5 35 53 97 13 - +33 (0)6 68 48 20 10 -- <http://gpcsolutions.fr> http://gpcsolutions.fr Technopole Hélioparc 2 avenue du Président Pierre Angot 64053 PAU CEDEX 9 SARL GPC.solutions au capital de 7 500 € - R.C.S. PAU 528 995 921 <https://www.google.com/a/partnersearch/#partner?partner_id=46687933_a0n60000000sqpWAAQ> <http://wiki.dolibarr.org/index.php/Dolibarr_suppliers_France#GPC.solutions>
_______________________________________________ Dolibarr-dev mailing list Dolibarr-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/dolibarr-dev