On May 2, 2008, at 2:42 PM, Craige Leeder wrote:
Hello Philip
First thing first: design patterns are your friend. A good reference
for which, is:
http://www.fluffycat.com/PHP-Design-Patterns/
Second of all. What is the situation in which you are trying to do
this? I can't really think of one
2008/5/2 Philip Thompson <[EMAIL PROTECTED]>:
> Hi all. I have several classes. Within each class, a new class is called. Is
> there a way to assign a function in a *deeper* class to be called in the
> first class? Example to follow..
>
>class A {
> function __construct () {
> $
On Fri, May 2, 2008 at 1:48 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 1:09 PM, Philip Thompson <[EMAIL PROTECTED]>
> wrote:
>
>> Hi all. I have several classes. Within each class, a new class is called.
>> Is there a way to assign a function in a *deeper* class to be cal
On Fri, May 2, 2008 at 2:03 PM, Craige Leeder <[EMAIL PROTECTED]> wrote:
> ons here) as a simple example something like this
> >
> > class B {
> > //...
> > function doSomething() {
> > return $this->c->doSomething();
> > }
> > }
> >
> > which allows you this in A instances
> >
> >
ons here) as a simple example something like this
>
> class B {
> //...
> function doSomething() {
> return $this->c->doSomething();
> }
> }
>
> which allows you this in A instances
>
> $this->b->doSomething();
>
> this is the preferred approach, since A and C instances are loosely
On Fri, May 2, 2008 at 1:09 PM, Philip Thompson <[EMAIL PROTECTED]>
wrote:
> Hi all. I have several classes. Within each class, a new class is called.
> Is there a way to assign a function in a *deeper* class to be called in the
> first class? Example to follow..
>
> class A {
>function _
Hello Philip
First thing first: design patterns are your friend. A good reference
for which, is:
http://www.fluffycat.com/PHP-Design-Patterns/
Second of all. What is the situation in which you are trying to do
this? I can't really think of one where you would do such a thing.
- Craige
On Fri,
Hi all. I have several classes. Within each class, a new class is
called. Is there a way to assign a function in a *deeper* class to be
called in the first class? Example to follow..
b = new B ();
// I want to do the following. This does not work, of course.
$this->doSomet
8 matches
Mail list logo