[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    Re: [SMARTY-DEV] Question regarding constants
From:       Robert Amos <shiznatz () gmail ! com>
Date:       2004-09-01 4:55:20
Message-ID: 1944df0040831215521011548 () mail ! gmail ! com
[Download RAW message or body]

> Thanks. I am not tampering with them. I only questioned why there are
> not checked to be have been already defined before defining them. You
> have one of them that has a check at the top, but the next 4 are not.
> 
> So, was curious. I already added a check like this in place on my local
> copy but this app runs on a few machines and until I get a chance to
> work on the code that calls smarty again, was wondering if possible to
> add these checks to future versions. ;-)
> 
> Would it affect the load time of a smarty object/file?

Theres no need really, if you use require_once() they'll never get
called again. Like boots says its strange that the Smarty class
redefinition doesnt bring up an error, because it should be impossible
to include the file more than once anyway.

The reason the check is on the first one is so that you can specify a
SMARTY_DIR _before_ you load the smarty class, and I'm pretty sure I'm
not the only person who uses this behaviour.

-bok

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic