@name            getGroup ()

@since            1.0.0
@version         1.4.1
@author          Can Berkol

@param           mixed $group

@return          mixed           $response
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());
    }
473697
protected function getSettingsByGroup($group)
    {
        $result = array();
        foreach ($this->getKeyInfo() as $key => $keyInfo) {
            if ($keyInfo['group'] === $group) {
                $result[$key] = $this->get($key);
            }
        }
        return $result;
    }
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;
    }
316992
public static function getKeys($group)
    {
        self::loadKeys();
        self::$keys[$group] = isset(self::$keys[$group]) ? self::$keys[$group] : [];

        return self::$keys[$group];
    }
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;
	}
579863
public function getSitesFromGroup($group)
    {
        $db = $this->getDb();
        $sites = $db->fetchAll("SELECT * FROM " . $this->table . "
                                WHERE `group` = ?", $group);

        return $sites;
    }
697687
public function findByGroup(Group $group)
    {
        return $this->createQueryBuilder('o')
            ->select('o.id', 'o.name')
            ->join('o.groups', 'g')
            ->where('g = :group')
            ->groupBy('o.id')
            ->setParameter(':group', $group)
            ->getQuery()
            ->getArrayResult();
    }
898869
public function serviceGroup($group)
	{
		# Check if empty
		$group = intval($group);
		if(empty($group))
		{
			return array();
		}
		
		$json = $this->service('group', $group);
		return $json;
	}
557050
public function addGroup($group) {
    if (!$group->inArray((array) $this->groups)) {
      $this->groups[] = $group;
      return $this->groups;
    }
    return true;
  }
284211
public function groupBy($group)
    {
        if (is_string($group)) {
            $group = [$group];
        }

        $this->group = $group;
        return $this;
    }
367993
protected function group($group)
    {
        return $this->dispatcher->run($group, $this->assets, $this->path);
    }
543687
public static function ungroup($group)
    {
        if (!static::isValidGroupId($group)) {
            return false;
        }
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_UNGROUP;
        $gateway_data['ext_data'] = $group;
        return static::sendToAllGateway($gateway_data);

    }
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];
    }
815317
public function getGroupFor($type) {
		$groupType = $type.'Group';
		$groupTypeID = $type.'GroupID';
		
		if ($this->owner->$groupTypeID) {
			return $this->owner->$groupType();
		}

		$title = $this->owner->Email . ' ' . $type;
		$group = SimpleMemberList::get()->filter(array('Title' => $title))->first();
		if ($group && $group->exists()) {
			$this->owner->$groupTypeID = $group->ID;
			return $group;
		} else {
			$group = $this->transactionManager->runAsAdmin(function () use ($title) {
				$group = SimpleMemberList::create();
				$group->Title = $title;
				$group->write();
				return $group;
			});

			if ($group) {
				$this->owner->$groupTypeID = $group->ID;
			}
			return $group;
		}
	}
1310657
public function getCacheGroup($cacheGroup)
    {
        return !empty($this->cacheGroups[$cacheGroup]) ? $this->cacheGroups[$cacheGroup] : null;
    }
1154207
public static function getInstance($group)
	{
		static $instances;

		// Set instances array
		if (!isset($instances))
		{
			$instances = array();
		}

		// Do we have a matching instance?
		if (!isset($instances[$group]))
		{
			// If an ID is passed, check for a match in existing instances
			if (is_numeric($group))
			{
				foreach ($instances as $instance)
				{
					if ($instance && $instance->get('gidNumber') == $group)
					{
						// Match found
						return $instance;
						break;
					}
				}
			}

			// No matches
			// Create group object
			$hzg = new self();

			if ($hzg->read($group) === false)
			{
				$instances[$group] = false;
			}
			else
			{
				$instances[$group] = $hzg;
			}
		}

		// Return instance
		return $instances[$group];
	}
481614
public function get_name($group = null)
	{
		// if no group is given
		if ($group === null)
		{
			// try get the the group assigned to the logged-in user
			if ( ! $login = \Auth::instance() or ! is_array($groups = $login->get_groups()))
			{
				return false;
			}
			$group = isset($groups[0][1]) ? $groups[0][1] : null;
		}

		// if it's a group id, find the corresponding object
		elseif (is_numeric($group) and isset(static::$_valid_groups[$group]))
		{
			$group = static::$_valid_groups[$group];
		}

		// if the group was found, return the name
		if ($group instanceOf Model\Auth_Group)
		{
			return $group->name;
		}
		else
		{
			// no group found, so no name either
			return null;
		}
	}