RE: Config directives in Smarty.class.php
| From: | Ralph Meijer | Date: | Sat, 23 Jun 2001 14:51:02 +0000 |
| Subject: | RE: Config directives in Smarty.class.php | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-959@lists.php.net to get a copy of this message | ||
On Thu, Jun 21, 2001 at 05:13:25PM +0200, Andreas Aderhold wrote:
> Hi Ralph,
>
> > With smarty however I have to adjust the Smarty.class.php file because
> > although it allows me to subclass it, the Compiler class is also a
> subclass
> > of the Smarty class and this causes a problem.
>
> Hmm, I have no problems subclassing smarty. It works fine here. Just testet
> it and appended the file...
>
> Andi
>
Right, that's because the config_dir value you use is the current directory,
which always exist. If I try another value, outside my webtree, when calling
the compiler class (which is a subclass of Smarty) the constructor of
Smarty tries to create a Config_File object (to be stored in
$this->_conf_obj).
However, since the constructor is called before any variables can be
changed, it uses the default './configs', which in my case doesn't exist
and generates an error.
Ralphm