_set_config_var #1 function

"Tarik ANSARI" <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
As promised, I worked onto the Config_File class, and here is attached the
_set_config_var function, that is full backward compatible (tested). The
function is nearly complete, it support :

_var5
var[0]
var.foo
var.foo[3].bar
var.foo.bar[2]

now, I have to add the support of :

var[$Const]

Where $Const is a numerical value that should be reached at
$smarty.const.Const. I didn't explored this yet, but I don't know if the
Config_File class access to $smarty.const.

One more things, now changes must be made on Smarty_Compiler class, and I
thougt about one thing, when overwrite is off and then that _set_config_var
create a sub-array, how are the config var accessed in template currently ?
(#overwritted[0]# ???) Then I guess that the Smarty_Compiler class have a
partial config vars array support ? (I must say that didn't really get how
the whole thing works, but trust me I got how the _set_config_var works,
you'll see on my function ;)


begin 666 _set_config_var.php
M9G5N8W1I;VX@7W-E=%]C;VYF:6=?=F%R*"8D8V]N=&%I;F5R+" D=F%R7VYA
M;64L("1V87)?=F%L=64L("1B;V]L96%N:7IE*0I["@EV87(@)'!O:6YT97([
M"2\O('=I;&P@<&]I;G0@;VX@=&AE("1C;VYT86EN97(@9&5S=&EN871I;VX@
M<W5B+6%R<F%Y"@EV87(@)&UA=&-H97,["2\O(&%L;&]W(%!214<@9G5N8W1I
M;VYS('1O(&)U9F9E<FEZ92!P87)S960@<W1R:6YG)W,@<&%R=',*"0H):68@
M*"1V87)?;F%M97LP?2 ]/2 G+B<I"@E["@D):68@*"$D=&AI<RT^<F5A9%]H
M:61D96XI"@D)"7)E='5R;CL*"0EE;'-E"@D)"21V87)?;F%M92 ]('-U8G-T
M<B@D=F%R7VYA;64L(#$I.PH)?0H)"@DO*@H)5&AE(&9O;&QO=VEN9R!04D5'
M(&5X<')E<W-I;VX@;6%T8V@@=&AO<V4@)'9A<E]N86UE('9A;'5E<R!F;W(@
M:6YS=&%N8V4Z"@D*"0E?=F%R-0H)"79A<ELP70H)"79A<BYF;V\*"0EV87(N
M9F]O6S-=+F)A<@H)"79A<BYF;V\N8F%R6S)="@DJ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D%,4T4["@E]"@D*"21P;VEN=&5R(#T@)'9A<E]V
(86QU93L*?0H`
`
end

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.