Reply to Re: [SMARTY] Extending the Config_File

Your name:

Reply:


Posted by boots on 11/03/05 19:45

There is a slight problem if you need to get a reference to the calling
Smarty object since it is not passed to the created config file
handler. Further, only one config file handler can be used. To me, not
having to use the config variable syntax is actually an advantadge.

For these reasons, I think it is often easier to simply assign into the
template variable scope which is easily doable using a standard plugin.

boots

--- Monte Ohrt <monte@ohrt.com> wrote:

> There should be no problem extending the Config_File class for your
> own
> needs. In the Smarty object, you can set $smarty->config_class =
> 'My_Config_File' or whatever you name your class.
>
> Erik Schmitt wrote:
>
> >No one?
> >
> >
> >
> >Am Samstag, 29. Oktober 2005 15:17 schrieb Erik Schmitt:
> >
> >
> >>Hello,
> >>
> >>I write an Add-on that needs multidimensional arrays
> >>extracted from a config-file with no simple key-value
> >>structure, like provided by a typical Smarty config-file.
> >>
> >>I would like Smarty to be able to parse this different-structured
> >>config-file, compile it and store it in templates_c; it should
> >>benefit from the capabilities of Smarty.
> >>
> >>Would it make sense to extend Config_File, overwrite
> >>the parse-method and tell Smarty to use Config_File_MyNewOne
> >>while parsing my different-structured config-file?
> >>Would I have to overwrite other methods?
> >>
> >>Is there any other apprach that makes more sense?
> >>
> >>
> >>Thanks!
> >>
> >>Erik





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация