[horde] docs on methods used in the framework

Chuck Hagenbuch chuck at horde.org
Thu Apr 19 07:16:23 PDT 2001


Quoting Nico Galoppo <scratch at ace.ulyssis.org>:

> I'm looking for some information on the general methods used somewhat
> everywhere in the horde framework. More specifically, i'm trying to
> understand the general Class:: / Class::Class_implementation methods
> used.

Okay. This might be a good starting point, depending on what you already know:
http://www.php.net/manual/en/language.oop.php

> For example, how do the pieces in the horde.prefs class fit together,
> which functions have to be used from:
> Prefs::factory(), &Prefs::singleton(), Prefs::add, Prefs::retrieve,
> Prefs::store()

factory() and singleton() are used to get a specific Prefs instance; the 
difference is that singleton() makes sure that there's only ever one instance 
with the same parameters (saves object creation sometimes). add(), retrieve(), 
and store() are all overridden by the specific implementations.

> Where do you have to call explicit Prefs::Prefs_session functions, such
> as Prefs::Prefs_session::store() & retrieve()?

You shouldn't call them directly; you should call $instance->retrieve(), for 
example, and the correct retrieve() method will be called depending on what 
subclass $instance is of.

> I'm sorry, it could be that this just covers general OOP concepts that I
> don't understand, maybe you could point me in the right direction then?

Hopefully this is a start for you; specific questions are always (well, 
usually) easier to answer, so if you're still unclear on something, try and 
come up with an example and we'll see what we can do.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>

Taurus:
You will receive an urgent transmission from the Martian government informing 
you that Mars does not, in fact, need women, so please stop sending them.




More information about the horde mailing list