Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi all,

reading re: the akrabat->zend _Config evolution.

iiuc, there will be only one zend-supported concrete form, and that will
be .ini, yes?

if so, quick question ...

i'm a yaml- &/or array-config user, not so much .ini's.  both allow easy
definition/reuse of a string constant in the configs -- arrays are
obvious, yaml via 'anchors'.

does (will?) the zend_config .ini implementation ?

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRon7UACgkQlffdvTZxCMYezACdEev9ccqeEtPUl9lvcr6N7zcb
7esAoIFT9OhPGA5H7rRFcyUzBbAz+gvM
=5jLm
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Andries Seutens
Hi,

From Zend's comments on the proposal:

Additional config storage containers will be developed so that a variety
of configuration file formats can be read.  However, the Zend Framework
itself will have only one format.  This has yet to be decided and is not
considered part of this proposal.
---

Rob already implemented this, and made Zend_Config an abstract class, so you
can easily develop your on storage containers.

Regards,

Andries Seutens
Belgium
http://andries.systray.be/blog/

-----Oorspronkelijk bericht-----
Van: OpenMacNews [mailto:[hidden email]]
Verzonden: maandag 15 mei 2006 17:35
Aan: Zend Framework - General
Onderwerp: [fw-general] Zend_Config-to-be ... does concrete .ini form
support 'anchors'?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi all,

reading re: the akrabat->zend _Config evolution.

iiuc, there will be only one zend-supported concrete form, and that will
be .ini, yes?

if so, quick question ...

i'm a yaml- &/or array-config user, not so much .ini's.  both allow easy
definition/reuse of a string constant in the configs -- arrays are
obvious, yaml via 'anchors'.

does (will?) the zend_config .ini implementation ?

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRon7UACgkQlffdvTZxCMYezACdEev9ccqeEtPUl9lvcr6N7zcb
7esAoIFT9OhPGA5H7rRFcyUzBbAz+gvM
=5jLm
-----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi.

> Rob already implemented this, and made Zend_Config an abstract class, so you
> can easily develop your on storage containers.

thx, but that's not my question. it's clear it can be extended.

my question *is*, simply, does/will INI format -- as implemented in the
Zend_Config-to-be class -- support var defs / anchors, or not?

richard
- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRoq54ACgkQlffdvTZxCMbfhQCeOOqOfqjORhu4a5NYLylZtKhF
/QAAn0SJ33Jp2F/zxeWF643tbn2zB3lT
=SHur
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

akrabat
In reply to this post by OpenMacNews-2
OpenMacNews wrote:
> hi all,
>
> reading re: the akrabat->zend _Config evolution.
>
> iiuc, there will be only one zend-supported concrete form, and that will
> be .ini, yes?

Not decided yet. I went with ini as it's trivial to read using PHP and
Andi's example used it :)

> if so, quick question ...
>
> i'm a yaml- &/or array-config user, not so much .ini's.  both allow easy
> definition/reuse of a string constant in the configs -- arrays are
> obvious, yaml via 'anchors'.
>
> does (will?) the zend_config .ini implementation ?
>


You mean something like:


[colours]
$red = ff0000
$blue = 0000ff
foreground = $red
background = $blue

Personally, I doubt it as the ini file syntax is already being severely
stretched! Doesn't look too hard to implement though if it is wanted.

I'd be interested in some real-world use cases that required variables
within a config file.


Regards,

Rob...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi rob,

Rob Allen wrote, On 5/15/06 12:03 PM:
>> iiuc, there will be only one zend-supported concrete form, and that will
>> be .ini, yes?
>
> Not decided yet. I went with ini as it's trivial to read using PHP and
> Andi's example used it :)

fair nuf.

> You mean something like:
>
>
> [colours]
> $red = ff0000
> $blue = 0000ff
> foreground = $red
> background = $blue

yes.

> Personally, I doubt it as the ini file syntax is already being severely
> stretched! Doesn't look too hard to implement though if it is wanted.

easily done in yaml, btw ... and readily processesd by syck too!

> I'd be interested in some real-world use cases that required variables
> within a config file.

this may be an example of real-world MIS-use ;-)

e.g., i do this regularly with ezC's ArrayConfig (just as easily doable
with YAML ...):


$tools_root  = '/some annoyingly long & tortured path/tools';
$site_root   = '/another annoyingly long & tortured
path/sites/zend_sites/zend.testdomain.com';

return array (
'settings' => array (

  'site' => array (
    'tools_root'        => $tools_root,
    'site_root'         => $site_root,
    'fonts_dir'         => $site_root.'/resources/fonts/ttf',
    'includes_dir'      => $site_root.'/resources/includes',
    'scripts_dir'       => $site_root.'/resources/scripts',

...

(p.s., the more i use it the more fond *i* become of yaml ...)

cheers,

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRo06cACgkQlffdvTZxCMagsACfVsv5lVTGTlZEfeT9IrpKhetK
D8AAnAldi6XsP+yr/IdqpLe9gAiECQtI
=5klN
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Chris Hartjes
Isn't this an apples vs. oranges thing?  Your method works great in a
PHP file, while as far as I can tell the .ini file is not a
PHP-executable file.  I'm sure someone will correct me.

I dig YAML as well (I'm starting to use Rails for stuff as well) but
that would be another dependency for the framework, wouldn't it?

On 5/15/06, OpenMacNews <[hidden email]> wrote:

>
> $tools_root  = '/some annoyingly long & tortured path/tools';
> $site_root   = '/another annoyingly long & tortured
> path/sites/zend_sites/zend.testdomain.com';
>
> return array (
> 'settings' => array (
>
>   'site' => array (
>     'tools_root'        => $tools_root,
>     'site_root'         => $site_root,
>     'fonts_dir'         => $site_root.'/resources/fonts/ttf',
>     'includes_dir'      => $site_root.'/resources/includes',
>     'scripts_dir'       => $site_root.'/resources/scripts',
>
> ...
>

--
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> Isn't this an apples vs. oranges thing?  Your method works great in a
> PHP file, while as far as I can tell the .ini file is not a
> PHP-executable file.  I'm sure someone will correct me.

i honestly am not sure why that's relevant :-)

why does it matter?

as long as the concrete-form is properly processed ...

also, it can be done with a 'human readable' YAML file as well ...

> I dig YAML as well (I'm starting to use Rails for stuff as well) but

yaml != rails.  but i hear ya ...

> that would be another dependency for the framework, wouldn't it?

afaict, yup.

cheers,

richard

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRo11MACgkQlffdvTZxCMZqSgCfbW6cXTh/rL1YrlEtayaIZ79C
BKgAnjmAzrHdNe1ww2wy+gqFwvyUXWf8
=dfUk
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Chris Hartjes
/me dons his robes for the holy flamewar sure to follow

Well, to me it's relevant because you can't have everything.  Either
it's a non-PHP file that gets parsed (YAML or .ini style) or it's a
PHP file that gets included and your various config variables are now
available for your script(s).

Yes, YAML != Rails but YAML is used for DB config and for more things
as Rails developers start to push it in other directions.  In any
case, parsing a .ini file should be invisible to the developer who has
to use it.

YAML is appealing, but part of me says non-PHP dependencies don't
below in the framework.  Just my opinion of course.

In the end, it's good that we (as in those who are choosing to use the
framework) care about these things as a decision now effects all those
who follow.


On 5/15/06, OpenMacNews <[hidden email]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> > Isn't this an apples vs. oranges thing?  Your method works great in a
> > PHP file, while as far as I can tell the .ini file is not a
> > PHP-executable file.  I'm sure someone will correct me.
>
> i honestly am not sure why that's relevant :-)
>
> why does it matter?
>
> as long as the concrete-form is properly processed ...
>
> also, it can be done with a 'human readable' YAML file as well ...
>
> > I dig YAML as well (I'm starting to use Rails for stuff as well) but
>
> yaml != rails.  but i hear ya ...
>
> > that would be another dependency for the framework, wouldn't it?
>
> afaict, yup.
>
> cheers,
>
> richard
>
> /"\
> \ /  ASCII Ribbon Campaign
>  X   against HTML email, vCards
> / \  & micro$oft attachments
>
> [GPG] OpenMacNews at gmail dot com
> fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (Darwin)
>
> iEYEAREDAAYFAkRo11MACgkQlffdvTZxCMZqSgCfbW6cXTh/rL1YrlEtayaIZ79C
> BKgAnjmAzrHdNe1ww2wy+gqFwvyUXWf8
> =dfUk
> -----END PGP SIGNATURE-----
>
>


--
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> /me dons his robes for the holy flamewar sure to follow

no flamewar req'd! :-)

> YAML is appealing, but part of me says non-PHP dependencies don't
> below in the framework.  Just my opinion of course.
>
> In the end, it's good that we (as in those who are choosing to use the
> framework) care about these things as a decision now effects all those
> who follow.

true enuf, inasmuch as anyone's gonna listen to *me* ;-)

personally, i find "standard 'ini" limiting & inflexible ... but
understand the argument for not designing dependencies into the framework.

as others have pointed out, extensions to the 'core' function *will* come.

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRo3HIACgkQlffdvTZxCMbrmACgmoejxkfCxo7dWF6GMu91naIy
Io4AoMjKaZg46GBMTWLDUDE09UC58vNl
=ys61
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Nico Edtinger
In reply to this post by akrabat
[15.05.2006 21:03] Rob Allen wrote:

> You mean something like:
>
> [colours]
> $red = ff0000
> $blue = 0000ff
> foreground = $red
> background = $blue
>
> Personally, I doubt it as the ini file syntax is already being  
> severely
> stretched! Doesn't look too hard to implement though if it is wanted.
I though something like that is possible in PHP >= 5.1.0, but I  
couldn't get it to work. The syntax according to the docs is:

[color]
red = f00
blue = 00f
foreground = ${red}
background = ${blue}

nico

PGP.sig (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Andi Gutmans
In reply to this post by OpenMacNews-2
We don't plan on implementing anchors for .ini at this point. ZF
should definitely only have one way to configure it and that'd be INI
because it's so simple and straightforward, but as stated,
Zend_Config would support other backends too.

Andi

At 08:35 AM 5/15/2006, OpenMacNews wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: RIPEMD160
>
>hi all,
>
>reading re: the akrabat->zend _Config evolution.
>
>iiuc, there will be only one zend-supported concrete form, and that will
>be .ini, yes?
>
>if so, quick question ...
>
>i'm a yaml- &/or array-config user, not so much .ini's.  both allow easy
>definition/reuse of a string constant in the configs -- arrays are
>obvious, yaml via 'anchors'.
>
>does (will?) the zend_config .ini implementation ?
>
>richard
>
>- --
>
>/"\
>\ /  ASCII Ribbon Campaign
>  X   against HTML email, vCards
>/ \  & micro$oft attachments
>
>[GPG] OpenMacNews at gmail dot com
>fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.3 (Darwin)
>
>iEYEAREDAAYFAkRon7UACgkQlffdvTZxCMYezACdEev9ccqeEtPUl9lvcr6N7zcb
>7esAoIFT9OhPGA5H7rRFcyUzBbAz+gvM
>=5jLm
>-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi andi,

Andi Gutmans wrote, On 5/15/06 6:05 PM:
> We don't plan on implementing anchors for .ini at this point. ZF should
> definitely only have one way to configure it and that'd be INI because
> it's so simple and straightforward, but as stated, Zend_Config would
> support other backends too.

re: that 'support for other backends' ...

any thoughts on the proposal in the thread:

        [fw-general] Data interchange formats

to help with the whole issue?

cheers,

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRpKfYACgkQlffdvTZxCMYi0wCfamxfplDP8zQpV/n8GMsf2SpB
QngAn2sDAbRF9NHAtoptFS8313ny1FAG
=Rikn
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

Andi Gutmans
I'm catching up (a few days behind on the list).
Without even reading it though I'd be inclined to say that if we want
to keep the framework easy and simple, then mixing data exchange with
configuration data would probably not be the right thing. Rather
develop separate solutions for different problems.

At 06:25 PM 5/15/2006, OpenMacNews wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: RIPEMD160
>
>hi andi,
>
>Andi Gutmans wrote, On 5/15/06 6:05 PM:
> > We don't plan on implementing anchors for .ini at this point. ZF should
> > definitely only have one way to configure it and that'd be INI because
> > it's so simple and straightforward, but as stated, Zend_Config would
> > support other backends too.
>
>re: that 'support for other backends' ...
>
>any thoughts on the proposal in the thread:
>
>         [fw-general] Data interchange formats
>
>to help with the whole issue?
>
>cheers,
>
>richard
>
>- --
>
>/"\
>\ /  ASCII Ribbon Campaign
>  X   against HTML email, vCards
>/ \  & micro$oft attachments
>
>[GPG] OpenMacNews at gmail dot com
>fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.3 (Darwin)
>
>iEYEAREDAAYFAkRpKfYACgkQlffdvTZxCMYi0wCfamxfplDP8zQpV/n8GMsf2SpB
>QngAn2sDAbRF9NHAtoptFS8313ny1FAG
>=Rikn
>-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Zend_Config-to-be ... does concrete .ini form support 'anchors'?

OpenMacNews-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hi again,

Andi Gutmans wrote, On 5/15/06 6:29 PM:
> I'm catching up (a few days behind on the list).

heh .. i'm caught up, but still behind!  ;-)

> Without even reading it though I'd be inclined to say that if we want to
> keep the framework easy and simple, then mixing data exchange with
> configuration data would probably not be the right thing. Rather develop
> separate solutions for different problems.
>

when you get around to it, it may, in fact, come across differently, but ...

iIuc, the proposal *is* for a clean/flexible separation. but, again,
that's to my read ...

i'm sure others will continue to pipe-up! :-)

cheers,

richard

- --

/"\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \  & micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRpLEYACgkQlffdvTZxCMabgQCgmkGk339ezKwcVNxh53Ohz3JE
Z0MAn0U+sjrRrJ7bjcfq8jkMUKlrgzii
=F++e
-----END PGP SIGNATURE-----

Loading...