RE: RE: [SMARTY] RE: [PEAR] Pear::Auth and Smarty

From: Date: Tue, 17 Dec 2002 10:44:45 +0000
Subject: RE: RE: [SMARTY] RE: [PEAR] Pear::Auth and Smarty
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6860@lists.php.net to get a copy of this message
> > > Firstly, I would prefer to not have the $smarty->display > within the > > > myAuth class, but rather keep it within my index.php. Is this > > > possible, or even recommended? > > Any thoughts on this? Mmm, your drawlogin function can do an include of login.php which will take care of doing the $smarty->display() call > This is kinda what I'm asking below. Is it necessary to > recycle, which > I gather its not. If not then how can I use myAuth without myAuth > without the recycler? That's why I was wondering about extending the > Smarty class with myAuth rather than extending the Auth class. But the > above statement probably shows my ignorance of how PHP classes and OO > PHP work It is not necessary to recycle, if you have several nested levels that can become handy though, it up to you. You don't have to use the recycler. Either do drawlogin() { $smarty = new smarty; $smarty->display(); } or drawlogin() { include_once 'login.php'; } and in login.php $smarty = new smarty; $smarty->display(); There are surely otherways though. Arnaud.

« previous php.smarty.general (#6860) next »