On 30.01.2009, at 18:09, romtek wrote:
On Fri, Jan 30, 2009 at 4:57 AM, Kornel Lesiński > wrote:
On 30-01-2009 at 03:13:16 romtek wrote:
Assuming that unwinding when handling exceptions is more time
consuming than using if/else mechanism, wouldn't it be better to
build this ability into
On Fri, Jan 30, 2009 at 4:57 AM, Kornel Lesiński wrote:
> On 30-01-2009 at 03:13:16 romtek wrote:
>
> Assuming that unwinding when handling exceptions is more time consuming
>> than using if/else mechanism, wouldn't it be better to build this ability
>> into
>> PHPTAL?
>>
>
> Yes, exceptions ar
On 30-01-2009 at 03:13:16 romtek wrote:
Assuming that unwinding when handling exceptions is more time consuming
than using if/else mechanism, wouldn't it be better to build this ability into
PHPTAL?
Yes, exceptions are slower, but it doesn't make noticeable difference unless
you make thous
On Tue, Jan 27, 2009 at 6:12 AM, Kornel Lesiński wrote:
>
> This works only for external macros. I've just committed improved exception
> handling that allows fallback for local macro names:
>
> class MyTemplateFramework extends PHPTAL {
>public function executeMacro($path)
>{
>
Sweet, that is even better.
Best regards,
Levi Stanley
Kornel Lesiński wrote:
> On 26-01-2009 at 19:53:39 Levi Stanley wrote:
>
>> admirau:
>>
>> class MyTemplateFramework extends PHPTAL {
>> private $default_macro_file;
>> public function setDefaultFile($default_macro_file){
>>$
On 26-01-2009 at 19:53:39 Levi Stanley wrote:
admirau:
class MyTemplateFramework extends PHPTAL {
private $default_macro_file;
public function setDefaultFile($default_macro_file){
$this->default_macro_file;
}
public function executeMacro($path){
if (preg_match
admirau:
class MyTemplateFramework extends PHPTAL {
private $default_macro_file;
public function setDefaultFile($default_macro_file){
$this->default_macro_file;
}
public function executeMacro($path){
if (preg_match('/^(.*?)\/([a-z0-9_]*)$/i', $path, $m)){
Hello,
It would be very helpful to have something like default macro file.
I know, that people asked for this feature before.
For example: when only name of the macro is specified,
and this macro is not found in current file,
look for this macro in default template file.
$tpl->setDefaultMacroFi