Im not too strong in OOP, yet. But, would this be a possibility? Or something 
like it?

class Database {
  private $xmlAdapter;

  function newXmlAdapter() {
    $this->xmlAdapter = new XMLAdapter();
  }

}

class XMLAdapter {

}

Craig Jackson
Web Developer



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
Of Kevin
Sent: Wednesday, April 16, 2008 9:51 AM
To: Nathan Lane
Cc: UPHPU Discuss
Subject: Re: [UPHPU] Nested Classes?


Chances are if your getting a syntax error then its not possible.

As far as I know you cant nest classes.

-Kevin-

On Wed, Apr 16, 2008 at 9:35 AM, Nathan Lane <[EMAIL PROTECTED]>
wrote:

> Are nested classes possible in PHP 5? I try to do something like this:
>
> class Database {
>    class XmlAdapter {
>    }
> }
>
> and I get a syntax error from Eclipse PDT, "Expecting: 'function'"
>
> What am I doing wrong?
>
>
> --
> Nathan Lane
> Home, http://www.nathandelane.com
> Blog, http://nathandelane.blogspot.com
>
> _______________________________________________
>
> UPHPU mailing list
> [email protected]
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net


_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to