PHP Classes

Start and end delimiters the same?

Recommend this page to a friend!

      PclTemplate  >  All threads  >  Start and end delimiters the same?  >  (Un) Subscribe thread alerts  
Subject:Start and end delimiters the same?
Summary:Can the start and end delimiters be the same string?
Messages:4
Author:Jim A
Date:2006-12-15 07:52:26
Update:2006-12-15 22:35:15
 

 


  1. Start and end delimiters the same?   Reply   Report abuse  
Picture of Jim A Jim A - 2006-12-15 07:52:26
I have a bunch of templates that use @@ to delimit a text substitution variable (i.e., token) and would like to use PclTemplate to replace the existing template processing engine.

For example:

text ... @@LAST_NAME@@, @@FIRST_NAME@@ ... text

Can PclTemplate be used with this kind of delimiter? Or, will I have to edit the templates to something like:

text ... @@(LAST_NAME)@@, @@(FIRST_NAME)@@ ... text

Thanks!

  2. Re: Start and end delimiters the same?   Reply   Report abuse  
Picture of Vincent Blavet Vincent Blavet - 2006-12-15 10:01:50 - In reply to message 1 from Jim A
Did not test this situation ...
Just did a quick test, and it does not seem to work ... need to do more troubleshoot to support this. No time to do it now.
By the time I correct this, you need to have different delimiters.
Thanks for your feedback and sorry about that !
Vincent

  3. Re: Start and end delimiters the same?   Reply   Report abuse  
Picture of Vincent Blavet Vincent Blavet - 2006-12-15 12:56:35 - In reply to message 2 from Vincent Blavet
Version 0.2 was not written to support same start/stop delimiters.
I updated the code. The new version 0.3 is on PhpConcept :
phpconcept.net/pcltemplate/index.ph ...

Should work now ! Let me know if any other problems ...

Hope this helps,
Vincent

  4. Re: Start and end delimiters the same?   Reply   Report abuse  
Picture of Jim A Jim A - 2006-12-15 22:35:15 - In reply to message 3 from Vincent Blavet
Thank you! Thank you! Thank you!