getConversionGroupUnits
Returns an array of units of measure, for a specified conversion group, or for all groups

@param	string	$group	The group whose units of measure you want to retrieve
@return	array
356077
public static function getConversionGroupUnits($group = NULL) {
		$conversionGroups = array();
		foreach(self::$_conversionUnits as $conversionUnit => $conversionGroup) {
			if ((is_null($group)) || ($conversionGroup['Group'] == $group)) {
				$conversionGroups[$conversionGroup['Group']][] = $conversionUnit;
			}
		}
		return $conversionGroups;
	}
649760
public static function getUnits() {
        return [
            self::FILE_SIZE_UNIT_B,
            self::FILE_SIZE_UNIT_KB,
            self::FILE_SIZE_UNIT_MB,
            self::FILE_SIZE_UNIT_GB,
            self::FILE_SIZE_UNIT_TB,
            self::FILE_SIZE_UNIT_PB,
            self::FILE_SIZE_UNIT_EB,
            self::FILE_SIZE_UNIT_ZB,
            self::FILE_SIZE_UNIT_YB,
        ];
    }
1274385
public function getConversions($unit)
    {
        if (!isset($this->units[$unit]['base'])) {
            throw new OutOfBoundsException('Unit is not set');
        }

        $units = array();

        foreach ($this->units as $key => $value) {
            if (isset($value['base']) && $value['base'] === $this->units[$unit]['base']) {
                array_push($units, $key);
            }
        }

        return $units;
    }
1214680
public function withGroup($group)
    {
        $group = str_replace('\\', '/', $group);
        if (!isset(static::$instances[$group])) {
            $instance = new static($this->options);
            $instance->setGroup($group);
            static::$instances[$group] = $instance;
        }
        return static::$instances[$group];
    }
733448
private function getObjectStateGroupsIds(array $groups): array
    {
        $groupsIds = array_column($groups, 'id');

        return array_combine($groupsIds, array_fill_keys($groupsIds, false));
    }
987503
public static function getClientCountByGroup($group = '')
    {
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_GET_CLIENT_COUNT_BY_GROUP;
        $gateway_data['ext_data'] = $group;
        $total_count              = 0;
        $all_buffer_array         = self::getBufferFromAllGateway($gateway_data);
        foreach ($all_buffer_array as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $count) {
                if ($count) {
                    $total_count += $count;
                }
            }
        }
        return $total_count;
    }
1338819
public function inGroup($group = null) {
    if (is_numeric($group)) {
      $group = Group::factory((int) $group);
    }
    if (!isset($group->guid)) {
      return false;
    }
    return ($group->inArray((array) $this->groups) || $group->is($this->group));
  }
441972
private function sortGroup(array $group)
    {
        if (empty($group)) {
            return [];
        }

        if ($this->sortType == self::SORT_TYPE_LENGTH) {
            usort($group, function ($a, $b) {
                $cmp = strlen($b) - strlen($a);

                if ($cmp === 0) {
                    $a = strtolower($a);
                    $b = strtolower($b);

                    $cmp = strcmp($b, $a);
                }

                return $cmp;
            });
        } elseif ($this->sortType == self::SORT_TYPE_ALPHABETIC) {
            usort($group, function ($a, $b) {
                $a = strtolower($a);
                $b = strtolower($b);

                $cmp = strcmp($b, $a);
                if ($cmp === 0) {
                    $cmp = strlen($b) - strlen($a);
                }

                return $cmp;
            });
        }

        if ($this->sortDirection == self::SORT_DIRECTION_ASC) {
            $group = array_reverse($group);
        }

        return $group;
    }
271873
public function group($group)
    {
        $group = $this->prepareNames(func_get_args(), false);
        $this->group = $group;
        return $this;
    }
1329744
protected function GetAdminGroups($group = "")
	{
		$keys = array_keys($this->GetAdminModulesList());
		if ($group != "")
		{
			if (in_array($group, $keys))
			{
				$keys = array($group);
			}
			else
			{
				$keys = array();
			}
		}
		
		$arr = new ArrayDataset($keys, "name");
		return $arr->getIterator();
	}
1168198
public function getTabGroup(string $group): TabGroup
    {
        if (!isset($this->tabGroups[$group])) {
            throw new \InvalidArgumentException(sprintf('Requested group named "%s" is not found. Did you forget to tag the service?', $group));
        }

        return $this->tabGroups[$group];
    }
777107
public function getGroup($group)
    {
        $timeStamp = time();
        if ($group instanceof BundleEntity\MemberGroup) {
            return new ModelResponse($group, 1, 0, null, false, 'S:D:002', 'Entries successfully fetched from database.', $timeStamp, time());
        }
        $result = null;
        switch ($group) {
            case is_numeric($group):
                $result = $this->em->getRepository($this->entity['mg']['name'])->findOneBy(array('id' => $group));
                break;
            case is_string($group):
                $result = $this->em->getRepository($this->entity['mg']['name'])->findOneBy(array('code' => $group));
                break;
        }
        if (is_null($result)) {
            return new ModelResponse($result, 0, 0, null, true, 'E:D:002', 'Unable to find request entry in database.', $timeStamp, time());
        }

        return new ModelResponse($result, 1, 0, null, false, 'S:D:002', 'Entries successfully fetched from database.', $timeStamp, time());
    }
1320713
public function group($group = null)
    {
        if ($group !== null) {
            $this->_group = $group;
        }
        return $this->_group;
    }
904
protected function getResponseCodeGroupRange($group) {
        switch ($group) {
            case 'informational':
                $min = 100;
                $max = 199;
                break;
            case 'success':
                $min = 200;
                $max = 299;
                break;
            case 'redirection':
                $min = 300;
                $max = 399;
                break;
            case 'client error':
                $min = 400;
                $max = 499;
                break;
            case 'server error':
                $min = 500;
                $max = 599;
                break;
            default:
                throw new InvalidArgumentException(sprintf('Invalid response code group: %s', $group));
        }

        return [
            'min' => $min,
            'max' => $max,
        ];
    }
1181757
protected function resolveGroup($group)
    {
        if (is_string($group)) {
            $group = Group::whereHandle($group)->firstOrFail();
        }

        return $group;
    }
467732
private function detectSquare($group)
        {
            $max_x = 0;
            $max_y = 0;
            $min_x = $this->width;
            $min_y = $this->width;
            
            foreach($group->points as $elem) {
                $min_x = min($min_x, $elem[QR_AREA_X]);
                $max_x = max($max_x, $elem[QR_AREA_X]);
                $min_y = min($min_y, $elem[QR_AREA_Y]);
                $max_y = max($max_y, $elem[QR_AREA_Y]);
            }
            
            return array($min_x, $min_y, $max_x+1, $max_y+1);
        }
1361120
protected function keyUnitsById() {
    $keyed_units = array();
    foreach ($this->units as $unit) {
      $keyed_units[$unit->getUnitId()] = $unit;
    }

    return $keyed_units;
  }