Turba_Driver::getObjects PHP Method

getObjects() public method

Retrieves a set of objects from the source.
public getObjects ( array $objectIds ) : array
$objectIds array The unique ids of the objects to retrieve.
return array The array of retrieved objects (Turba_Objects).
    public function getObjects(array $objectIds)
    {
        $objects = $this->_read($this->map['__key'], $objectIds, $this->getContactOwner(), array_values($this->fields), $this->toDriverKeys($this->getBlobs()), $this->toDriverKeys($this->getDateFields()));
        if (!is_array($objects)) {
            throw new Horde_Exception_NotFound();
        }
        $results = array();
        foreach ($objects as $object) {
            $object = $this->toTurbaKeys($object);
            $done = false;
            if (!empty($object['__type']) && ucwords($object['__type']) != 'Object') {
                $class = 'Turba_Object_' . ucwords($object['__type']);
                if (class_exists($class)) {
                    $results[] = new $class($this, $object, $this->_objectOptions);
                    $done = true;
                }
            }
            if (!$done) {
                $results[] = new Turba_Object($this, $object, $this->_objectOptions);
            }
        }
        return $results;
    }