[UPHPU] Nested Classes?

Nathan Lane nathamberlane at gmail.com
Wed Apr 16 10:42:55 MDT 2008


No, you're right - I realized that as I was typing it into PDT. I can't see
any way to implement nested classes obviously right now. PHP.net doesn't
supply any examples. I want to have classes I call adapters to communicate
transparently between "queries" and "databases", and I'm starting at the
database end. Anyway, so since I can't use nested classes, I just decided to
structure everything a little bit differently:

Database.php
  -- require_once('exceptions/exceptions.php');
    -- include('FunctionNotImplementedException.php');
  -- require_once('adapters/adapters.php');
    -- include('SqlAdapter.php');
    -- include('XmlAdapter.php');

Do I look like I'm starting well? I expect everything that is "include"d in
the exceptions.php and adapters.php to be readily available to Database.php.
Or is my understanding of inheritance incorrect?

Nathan

On Wed, Apr 16, 2008 at 10:36 AM, Roberto Mello <roberto.mello at gmail.com>
wrote:

> But the code posted by Craig doesn't give you a function pointer.
> Database.xmlAdapter will just be an instance of XMLAdapter, not a
> function pointer. Or were you referring to something else?
>
> Roberto
>

-- 
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.com


More information about the UPHPU mailing list