[dev] [turba] abstract setObject() method in Driver.php

Jan Schneider jan at horde.org
Wed Jan 21 16:43:22 PST 2004


Zitat von Michael Rubinsky <mike at theupstairsroom.com>:

> In developing a new driver for Turba, I've come across the following
> 'problem'.
>
> In the class definition of  turba/lib/Driver.php the setObject method is
> defined as follows:
>
> function setObject($attributes)
> {
> .
> .
> }
>
> but it seems that the code calling it from turba/lib/Source.php is passing
> 3 parameters:
>
> $result = $this->driver->setObject($object_key, $object_id, $attributes);
>
> I know that Driver.php in the 1.2.2 release version did accept 3
> parameters.  Should the Driver.php in the HEAD version be changed to accept
> the 3 parameters (and hence any new drivers should contain 3) or should
> code in newly developed drivers be written to only accept the 1...and if
> so, what would the structure of the $attributes array be?

The method in Driver.php is an abstract method. If you look at the concrete
implementations in the different drivers you'll see that they all use the
three parameters.
I fixed the signature of the abstract method to include all parameters too.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list