Eric,
> What has been confusing me the whole time is that in your
> example you have
> the data() method/function
> In that you fill in manually the $this->data global with a
> data structure
> that you expect to have later on in the "example" I
> understand now I think,
> that the purpose of this is to give us total control over how we get
> customer data, where the only rules are the API/function calls.
>
> But even so, if that is the case this example really seems to suck.
> $this->data[$customer_id]; is refering to an existing value,
> rather than
> what might be a DB lookup.
>
Well, what you need to understand is that this is an API, but what you
are really looking at is a quick implementation of the API. If you are
thinking about doing database lookups instead of building that huge
array of customers, you are going on the right path. The Example
implementation is just supposed to be an example, and not something that
you use to build something from it.
If you want to build a new implementation, I believe the best way to do
it is to copy the abstract class and start from scratch.
--Joao