Hi,
I'm not oppose to create a C module for OO template, but
new syntax is overkill.
Anyway, I would rather to have dedicated escape API for
- JavaScript strings
- JavaScript Identifiers
- CSS params
- CSS Identifiers
- what else?
It would be better to have dedicated escape functions so th
There is probably a performance hit there when your view offers a lot
of methods, but that is nevertheless a very clever solution (:
On Mon, Apr 9, 2012 at 9:51 PM, Jared Williams
wrote:
>> -Original Message-
>> From: Tom Boutell [mailto:t...@punkave.com]
>> Sent: 09 April 2012 16:10
>> T
> -Original Message-
> From: Tom Boutell [mailto:t...@punkave.com]
> Sent: 09 April 2012 16:10
> To: PHP Internals
> Subject: [PHP-DEV] Object oriented page templates in PHP
>
> There has been talk of making PHP a better templating
> language. After all, it did start out there.
>
> Folk
It definitely can be, yeah. I thought perhaps I'd hit on a way to do
it without as much redundant userland code to duplicate PHP's
templating behavior first and then make it better. But it's probably
not realistic to hardcode this one. No two people agree on templating
languages for long (:
On Mon
On 2012-04-09, Tom Boutell wrote:
> There's a reason I didn't try to kick this out as a fully formed RFC (:
>
> The choice of @ is a nonstarter, yes. I forgot that start code for PHP already so it is already valid PHP to write http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matth
On 04/09/2012 05:10 PM, Tom Boutell wrote:
What if PHP supported a short tag for calling a method of $this?
Then one could write:
And 'escape' could be upgraded and modified as needed in an object
oriented way without the need to type many times.
You might be able to achieve this using the
There's a reason I didn't try to kick this out as a fully formed RFC (:
The choice of @ is a nonstarter, yes. I forgot that wrote:
> -1.
>
> PHP doesn't need more magic.
>
> On Mon, Apr 9, 2012 at 4:53 PM, Nikita Popov
> wrote:
>>
>> On Mon, Apr 9, 2012 at 5:10 PM, Tom Boutell wrote:
>> > What
-1.
PHP doesn't need more magic.
On Mon, Apr 9, 2012 at 4:53 PM, Nikita Popov wrote:
> On Mon, Apr 9, 2012 at 5:10 PM, Tom Boutell wrote:
> > What if PHP supported a short tag for calling a method of $this?
> >
> > Then one could write:
> >
> >
>
> A big -1 on this.
>
> If you want to roll you
On Mon, Apr 9, 2012 at 5:10 PM, Tom Boutell wrote:
> What if PHP supported a short tag for calling a method of $this?
>
> Then one could write:
>
>
A big -1 on this.
If you want to roll your own template syntax, just do so. It's not
that hard to run a quick str_replace('',
$code) over the templ
@ before a function call will simply turn off error reporting for that
particular call. You will have to choose a different syntax. And, yes,
personally, I am against this suggestion. There are template engines that
already do similar things (Blitz, for instance) without requiring changes
in the la
10 matches
Mail list logo