Re: Using a class inside of a class
| From: | Nathan Rixham | Date: | Sat, 13 Dec 2008 04:46:54 +0000 |
| Subject: | Re: Using a class inside of a class | ||
| References: | 1 2 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-284575@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
On Fri, 2008-12-12 at 13:21 -0800, Richard Kurth wrote:sounds right to me Rob.. function whatever() { $mailer = new PHPMailer(); $mailer->send( $this->email ); } pretty standard stuff (and the point of classes/objects i think? regards!Can I use another class inside of a function in a class this function process_queue below is inside of a class called class mailer I want to use the phpMailer class inside of this function so I can send email using smtp. Can this be done and is there any information out there on how to do thisShould be simple enough. Make sure you've included the file that holds the phpMailer class (and any dependencies it may have) then just instantiate an instance of the class... or am I missing the oint of the question? Cheers, Rob.