public function pickPermissionPriorityValue(array $values, $permissionType)
{
if ($permissionType == 'integer')
{
$highest = 0;
foreach ($values AS $value)
{
if ($value == -1)
{
return -1;
}
else if ($value > $highest)
{
$highest = $value;
}
}
return $highest;
}
else
{
$priority = 5;
$priorityName = 'unset';
foreach ($values AS $value)
{
$thisPriority = $this->permissionPriority[$value];
if ($thisPriority < $priority)
{
$priority = $thisPriority;
$priorityName = $value;
}
}
return $priorityName;
}
}