2011年2月15日星期二

Re: [fw-mvc] Application.ini / Arrays

Good question,

When you call $bootstrap->getOption('recaptcha'); it returns an array.
So that give you the flexibility so it seems.

I'm fairly new to the Zend Framework so I'm just trying to feel my way
around and the application.ini seemed to be something that a book on
Zend showed and it seemed to make sense for keeping all your global
stuff like DB config, mail config etc all in one place. I decided that
it might be a good place to keep the content for my email massages as
well. A single location that's that easy to access.

I'll give the .x a try and see how that works out. Never occurred to me
to try something so simple.


Thanks
Lionel


On 2/15/11 6:18 PM, Dolf Schimmel wrote:
> Try:
>> mail.message.forgotten.1 = 'Email: [toemail /]'
>> mail.message.forgotten.2 = 'Password: [password /]'
>> mail.message.forgotten.3 = ''
>> mail.message.forgotten.4 = 'To change your password please open [domain /]
> Can I also ask you why you use .ini, and not something much more
> performant and flexible like php arrays?
>
> Regards,
>
> Dolf
> -- Freeaqingme
>
> On Wed, Feb 16, 2011 at 12:11 AM, Lionel Morrison
> <lionel@morrison101.com> wrote:
>> What is the correct way to specify text array within the application.ini
>>
>>
>> This is what I currently have:
>>
>> mail.message.forgotten[] = 'Email: [toemail /]'
>> mail.message.forgotten[] = 'Password: [password /]'
>> mail.message.forgotten[] = ''
>> mail.message.forgotten[] = 'To change your password please open [domain /]
>> in your browser, login and use the form provided.'
>> recaptcha.pubKey = 6LeqYcESAAAAAIa3LKABz7CxmyLu2N_gm1oIt74W
>> recaptcha.privKey = ???
>>
>>
>> Is this correct or is they a 'preferred' method. I ask because on my local
>> server running 1.11 the application.ini works as expected. On my production
>> server running 1.10 (I think) it works but any thing that I specify after
>> the array element displays as NULL when called using the following method.
>>
>> $bootstrap->getOption('recaptcha');
>>
>> Thanks
>>
>> Lionel
>>

没有评论: