Horde_Group_Ldap::_getData PHP Method

_getData() protected method

Returns all available attributes of a group.
protected _getData ( mixed $gid ) : array
$gid mixed A group ID.
return array The group's date.
    protected function _getData($gid)
    {
        try {
            $entry = $this->_ldap->getEntry($gid);
            $attributes = $entry->getValues();
        } catch (Horde_Ldap_Exception $e) {
            throw new Horde_Group_Exception($e);
        }
        $data = array();
        foreach ($attributes as $attribute => $value) {
            switch ($attribute) {
                case $this->_params['gid']:
                    $attribute = 'name';
                    break;
                case 'mail':
                    $attribute = 'email';
                    break;
            }
            $data[$attribute] = $value;
        }
        return $data;
    }