public listGroups ( string $user ) : array | ||
$user | string | A user name. |
리턴 | array | A list of groups, with IDs as keys and names as values. |
public function listGroups($user)
{
// Check list cache.
if (($list = $this->_getListCache($user)) !== null) {
return $list;
}
// Retrieve all groups.
$list = $this->_listGroups($user);
// Update list cache.
$this->_setListCache($list, $user);
return $list;
}