mindplay-dk / php-outline

Legacy template engine archived here for historical purposes
1 stars 0 forks source link

{require}-syntax (Constants etc...) #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. {require MY_CONSTANT . "/somefile.php";

What is the expected output?
<?php require MY_CONSTANT . "/somefile.php"; ?>

What do you see instead?
<?php require_once 'MY_CONSTANT . "/somefile.php"'; ?>

Original issue reported on code.google.com by puppetma...@gmail.com on 28 Jul 2010 at 12:07

GoogleCodeExporter commented 9 years ago
I can see how this command isn't actually much use - I guess I never gave it 
much thought, just threw it in there in case someone needed to do a 
require_once() for a class or something. Not much use without the ability to 
use a variable or constant for the path.

For now, you can use {set require MY_CONSTANT.'/somefile.php'} which looks a 
little odd, but should work fine.

Not sure it's possible to change this without breaking backwards compatibility. 
But I guess maybe that's no great concern, as this command is pretty much 
useless as it is - I can't imagine anyone has been using this?

Original comment by rasmus.m...@gmail.com on 29 Jul 2010 at 4:50