Monday, March 18, 2013

Re: Best Practise: Use Utilmethods in Controllers, Views, Components...

Hi Lowbass,

good idea! I will go this way. Also this solution seems to be very
"maintain-friendly" ;)

Thanks for your answer.

Best regards,
Kai.

Am 17.03.2013 18:15, schrieb lowpass:
> I used to put this sort of thing in bootstrap.php but lately I've been
> putting a file in the app/Lib directory and including it at the end of
> bootstrap.
>
> On Fri, Mar 15, 2013 at 11:44 AM, kaiszy <kaikison@googlemail.com> wrote:
>> Hi!
>>
>> I have several Utility Routines that i wan't to use in all Objects (Models,
>> Controllers, Views,...).
>>
>> For example i have a small Method called "getDataFromArray" that fetch a
>> element from an Array or throws a CakeException if the key doesnt exists.
>> Because of DRY i wan't to use it in *.
>>
>> What is best practice to do so ?
>>
>> Thanks!
>>
>> Best regards,
>> Kai.
>>
>> --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to cake-php+unsubscribe@googlegroups.com.
>> To post to this group, send email to cake-php@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>


--
Kai Szymanski

Theodor-Heuss-Allee 21
28215 Bremen

EMail ks@codebiz.de / Web http://www.codebiz.de

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser Mail und der darin enthaltenen Informationen
sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: