FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Loading globals into classes
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Loading globals into classes [message #176765 is a reply to message #176760] Sun, 22 January 2012 22:08 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 1/22/2012 12:09 PM, J.O. Aho wrote:
> Scott Johnson wrote:
>
>> public function __construct($uom_ary, $months_ary)
>> {
>> $this->uom_ary = $uom_ary;
>> $this->months_ary = $months_ary;
>> }
>>
>> Previously I just used the global at the top of each method but had to
>> add it
>> for each method needing the array.
>
> Why not supply the information as arguments for the constructor.
>

Thanks for the input.

I will do some research on doing just that. Kind of like, 'you don't
know what you don't know' ;)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: list() Struktur auslagern
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 23:24:19 GMT 2024

Total time taken to generate the page: 0.04155 seconds