How can I use mapping?

1 view
Skip to first unread message

littlexiang

unread,
Jul 1, 2009, 8:59:12 AM7/1/09
to Serpent PHP Template Engine
It's said on wiki that I can use ~~:make()~ instead of ~~Helper::make()
~

How can I use it?
Should I modity serpert.class.php and add a __call() or something like
that?

McSod

unread,
Jul 1, 2009, 11:28:05 AM7/1/09
to Serpent PHP Template Engine
Hi,

it is explained here:
http://code.google.com/p/serpent-php-template-engine/wiki/CompilersSerpent

Just take a look at the mappings example.

Cheers,
Christoph

littlexiang

unread,
Jul 11, 2009, 7:51:04 AM7/11/09
to Serpent PHP Template Engine
Thanks .
I've integrated serpent into my framework. It's working pretty good.
But still I think you should add an cache plug-in. It's easier control
it from inside than outside.
I have written a cache class for my framework instead.

On Jul 1, 11:28 pm, McSod <goo...@cerdmann.com> wrote:
> Hi,
>
> it is explained here:http://code.google.com/p/serpent-php-template-engine/wiki/CompilersSe...

McSod

unread,
Jul 15, 2009, 4:10:09 PM7/15/09
to Serpent PHP Template Engine
Why it should be simpler from outside?
At our company Serpent is just one of many output engines (we have
others for xml, csv, excel, json and so on), all controlled by the
view (MVC) class. And if you want to cache the output it should not be
dependent on your engine, right? The cache should be under control of
the view class so you could use the same cache functionality for all
output engines.

littlexiang

unread,
Jul 20, 2009, 4:05:08 AM7/20/09
to Serpent PHP Template Engine
Thanks. That's a good reason.
Reply all
Reply to author
Forward
0 new messages