Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51055 invoked from network); 9 Apr 2012 18:29:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 18:29:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:52278] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/A3-34074-C6A238F4 for ; Mon, 09 Apr 2012 14:29:00 -0400 Received: by yhfq11 with SMTP id q11so2268942yhf.29 for ; Mon, 09 Apr 2012 11:28:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=DOUw7wGLqBa9kFNKMQtL3Cgxtr1G23hBMQgy3pN0q7U=; b=VsvWCJ70mxD3XnigNkg24o2vTIqppFbAJkEw9L3/oO2jyo4rTPR3oeSmZMyQss2/wZ wQDrSAG+fb310G6GEgRE4HCqR4laMh/sAneoVZpUTJQ/uYKRyfFtzlWRJearRPYgG7+c V0jBozRTDHpvCMUxp9MJhrMQnMl0juJmepwnrfY4PTrO9Gy8JxidW4q8Sx9otrzhJlwW 9swDUTrSeOEwdqBjV+wyyFNJd56DavL0qk24Gtgf/umVEvW/ZsxnenUT0xKQEing/8c+ ytHmtZ2mCER8l8GEolzGnQ5wdJedQIpYR1fNlHJuvpoOH8UFP6kwrwhcUA53zj7OgZAT X/6w== MIME-Version: 1.0 Received: by 10.236.184.229 with SMTP id s65mr6189582yhm.102.1333996137281; Mon, 09 Apr 2012 11:28:57 -0700 (PDT) Received: by 10.100.35.16 with HTTP; Mon, 9 Apr 2012 11:28:57 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Apr 2012 14:28:57 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlw/rG4hOMItketnT4GRMcAeaKtBqvKQGrfUO1bCV2nmNlVfHbm2NcKUoCBrygFwgf1gIjZ Subject: Re: [PHP-DEV] Object oriented page templates in PHP From: tom@punkave.com (Tom Boutell) 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, Apr 9, 2012 at 1:49 PM, Matthew Weier O'Phinney wrote: > 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 > Another tack to take is to use PHP's streams support. We did this in > ZF's Zend_View at one point to emulate short tags when they're disabled. > Basically, it allows you to pre-process the template file as it's being > included. > > The downside is, of course, performance. However, you could very easily > add a caching layer to this as well to cache the modified code so that > subsequent calls do not have to do the pre-processing. > > Basically, I think this is something that can be accomplished in > userland. > > > -- > Matthew Weier O'Phinney > Project Lead =A0 =A0 =A0 =A0 =A0 =A0| matthew@zend.com > Zend Framework =A0 =A0 =A0 =A0 =A0| http://framework.zend.com/ > PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com