* @throws Horde_Kolab_Server_Exception If the requested Horde_Kolab_Server
* subclass could not be found.
*/
- public function &factory($driver, $params = array())
+ static public function &factory($driver, $params = array())
{
$class = 'Horde_Kolab_Server_' . basename($driver);
if (class_exists($class)) {
* missing or the given user could not
* be identified.
*/
- public function &singleton($params = null)
+ static public function &singleton($params = null)
{
global $conf;
}
$hash = array();
- foreach ($list as $entry) {
- $hash[] = $entry->toHash($attributes);
+ foreach ($list as $uid => $entry) {
+ $hash[$uid] = $entry->toHash($attributes);
}
return $hash;
$result = $server->listObjects('Horde_Kolab_Server_Object_user');
$this->assertNoError($result);
$this->assertEquals(2, count($result));
- $this->assertEquals('Horde_Kolab_Server_Object_user', get_class($result[0]));
+ $this->assertEquals('Horde_Kolab_Server_Object_user', get_class(array_shift($result)));
$result = $server->listObjects('Horde_Kolab_Server_Object_sharedfolder');
$this->assertNoError($result);
$this->assertEquals(1, count($result));
- $this->assertEquals('Horde_Kolab_Server_Object_sharedfolder', get_class($result[0]));
+ $this->assertEquals('Horde_Kolab_Server_Object_sharedfolder', get_class(array_shift($result)));
}
/**