NYCPHP Meetup

NYPHP.org

[nycphp-talk] Accessing a method from one class in another

Cliff Hirsch cliff at pinestream.com
Mon Jan 16 18:01:58 EST 2006


Nothing, if the db connection object is created as a singleton.
Otherwise, you would generate multiple connections.

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Randal Rust
Sent: Monday, January 16, 2006 9:40 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Accessing a method from one class in another

On 1/16/06, cliff <cliff at pinestream.com> wrote:

> you can also set up a constructor in each class:

What is the effect though if you need access to two objects, and both
of them create the db connection in their respective constructor?

--
Randal Rust
R.Squared Communications
www.r2communications.com
_______________________________________________
New York PHP Community Talk Mailing List
Show Your Participation
http://www.nyphp.org/show_participation.php
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org




More information about the talk mailing list