Re: [PHP Template] load template from string var

[email protected] (Andrei Zmievski) Mon, 13 Mar 2000 21:54:20 -0600
Newsgroups php.template
Message-ID <[email protected]>
At 06:30 PM 3/13/00 -0600, Jeremiah Bellomy wrote:
>This may already be possible with the current API but I couldn't tell for
>sure from the spec file, so here goes:
>
>I just wanted to be sure that it's possible to load a template from the
>contents of a PHP variable as well as from files.  This allows for the
>possibility of storing templates in a database so that for example, I could
>load $my_template from the database and then make it a template with
>something like:
>
>tmpl_load_from_var(resource tmpl, string varname)
>    Loads a template from the contents of a string.
>
>tmpl_load_from_var('my_template.tpl', $my_template);
>
>
>So, is this possible by some other means currently defined in the spec?

Yes, this will definitely be possible. Sorry I haven't updated the spec
yet, currently busy working out the code for sections.

-Andrei