Registers a processing group.

@param string $group
@param string $action
@param int    $priority
342380
public function addGroup($group, $action, $priority = 0)
    {
        $this->assertNotFrozen();

        if (!empty($this->initialData[self::GROUPS][$action])) {
            foreach ($this->initialData[self::GROUPS][$action] as $existingGroup => $existingPriority) {
                if ($group !== $existingGroup && $priority === $existingPriority) {
                    throw new \InvalidArgumentException(
                        \sprintf(
                            'The priority %s cannot be used for the group "%s"'
                            . ' because the group with this priority already exists.'
                            . ' Existing group: "%s". Action: "%s".',
                            $priority,
                            $group,
                            $existingGroup,
                            $action
                        )
                    );
                }
            }
        }

        $this->initialData[self::GROUPS][$action][$group] = $priority;
    }
152174
void groupReady(String group) {
    if (log.isDebugEnabled()) {
      log.debug(String.format("%s - Group ready: Group[group=%s]", this, group));
    }
    eventBus.send(outAddress, new JsonObject().putString("action", "group").putString("group", group));
  }
321210
public function add(FilterInterface $filter, $priority = 0)
    {
        $this->filters[$priority][] = $filter;
        $this->sorted = null;

        return $this;
    }
772527
public function setPriority($stateId, $priority)
    {
        $objectState = $this->load($stateId);
        $groupObjectStates = $this->loadObjectStates($objectState->groupId);

        $priorityList = array();
        foreach ($groupObjectStates as $index => $groupObjectState) {
            // Update given state and push all other states with same or higher priority down
            if ($objectState->id === $groupObjectState->id) {
                $priorityList[$groupObjectState->id] = (int)$priority;
            } else {
                $priorityList[$groupObjectState->id] = ($index < $priority ? $index : $index + 1);
            }
        }

        asort($priorityList, SORT_NUMERIC);

        foreach (array_keys($priorityList) as $objectStatePriority => $objectStateId) {
            $this->objectStateGateway->updateObjectStatePriority($objectStateId, $objectStatePriority);
        }
    }
1288787
function registerConditionsToGroup(conditions) {
            for (let i = 0; i < conditions.length; ++i) {
                const condition = conditions[i];

                if (condition.group) {
                    let group = groupMap.get(condition.group);

                    if (!group) {
                        group = [];
                        groupMap.set(condition.group, group);
                    }
                    group.push(condition);
                }
            }
        }
1258193
public function enqueue($payload, $priority = 0)
    {
        $this->collection
            ->createDocument(array(
                'payload'   => $payload,
                'priority'  => (int) $priority,
                'datetime'  => new \MongoDate,
            ))
            ->save();
        
        return $this;
    }
200491
public function add($path,$type,$group='head',$priority=5,$slot=null,$params=null) {
		if (!isset($this->assets[$group]))
			$this->assets[$group]=array();
		if (!isset($this->assets[$group][$type]))
			$this->assets[$group][$type]=array();
		$asset = array(
			'path'=>$path,
			'type'=>$type,
			'slot'=>$slot
		) + ($params?:array());
		if (preg_match('/^(http(s)?:)?\/\/.*/i',$path)) {
			$asset['origin'] = 'external';
			$this->assets[$group][$type][$priority][]=$asset;
			return;
		}
		foreach ($this->f3->split($this->f3->get('UI')) as $dir)
			if (is_file($view=$this->f3->fixslashes($dir.$path))) {
				$asset['path']=ltrim($view,'./');
				$asset['origin']='internal';
				$this->assets[$group][$type][$priority][]=$asset;
				return;
			}
		// file not found
		if ($handler=$this->f3->get('ASSETS.onFileNotFound'))
			$this->f3->call($handler,array($path,$this));
		// mark unknown file as external
		$asset['origin'] = 'external';
		$this->assets[$group][$type][$priority][]=$asset;
	}
521715
protected function set($identifier, $cb, $priority=0) {
		$identifier = explode('.', $identifier);
		$arr =& $this->registry;
		$key = array_pop($identifier);
		foreach($identifier as $next)
			$arr =& $arr[$next];
		while(isset($arr[$key][$priority]))
			$priority += 1;
		if($cb instanceof \Closure)
			$cb = new SerializableClosure($cb);
		$arr[$key][$priority] = $cb;
	}
1194505
public function addAction( $action, $callback, $priority = 10 )
    {
        if ( !isset( $this->actions[ $action ] ) )
        {
            $this->actions[ $action ] = array();
        }

        $this->actions[ $action ][] = array(
            'priority' => $priority,
            'callback' => $callback,
        );

        if ( 1 < count( $this->actions[ $action ] ) )
        {
            usort( $this->actions[ $action ], array( $this, '_sortByPriority' ) );
        }

        if ( $this->debug )
        {
            echo PHP_EOL . '+ACTION: ' . $action . ' -> '
                    . $this->_serializeCallback( $callback )
                    . ' + Priority: ' . $priority
                    . PHP_EOL;
        }
    }
1248995
public static function registerEngine($engineClass, $priority)
    {
        if (!is_int($priority)) {
            trigger_error('Priority must be integer', E_USER_WARNING);

            return;
        }
        if (array_key_exists($priority, self::$registeredEngines)) {
            trigger_error('Priority already taken', E_USER_WARNING);

            return;
        }
        if (!class_exists($engineClass)) {
            trigger_error('Engine does not exist', E_USER_WARNING);

            return;
        }
        self::$registeredEngines[$priority] = $engineClass;
    }
72450
public function attach(EventManagerInterface $events, $priority = 1)
    {
        $this->listeners[] = $events->attach(ComposerEvent::EVENT_COMPOSE_POST, [$this, 'generateTextBody']);
    }
332678
private function getSortedProcessors($action, $actionData, $groups)
    {
        $processors = [];
        foreach ($actionData as $priority => $priorityData) {
            foreach ($priorityData as $processor) {
                if (isset($processor[1][self::GROUP_ATTRIBUTE])) {
                    $group = $processor[1][self::GROUP_ATTRIBUTE];
                    if (!isset($groups[$action][$group])) {
                        throw new \RuntimeException(
                            \sprintf(
                                'The group "%s" is not defined. Processor: "%s".',
                                $group,
                                $processor[0]
                            )
                        );
                    }
                    $groupPriority = $groups[$action][$group];
                    $processorPriority = self::calculatePriority($priority, $groupPriority);
                } else {
                    $processorPriority = self::calculatePriority($priority);
                }
                $processors[$processorPriority][] = $processor;
            }
        }
        $processors = $this->sortByPriorityAndFlatten($processors);

        return $processors;
    }
1324102
protected function registerGroupRepository()
    {
        $this->app->singleton('grouprepository', function ($app) {
            $model = $app['config']['sentry.groups.model'];
            $group = new $model();

            $validator = $app['validator'];

            return new GroupRepository($group, $validator);
        });

        $this->app->alias('grouprepository', GroupRepository::class);
    }
116331
private function registerListener($event, callable $listener, $priority)
    {
        if (!isset($this->events[$event])) {
            $this->events[$event] = [];
        }

        if ($priority === null) {
            $this->events[$event][] = $listener;

            return;
        }

        array_splice($this->events[$event], (int) $priority, 0, [$listener]);
    }
991665
public function add(MarshallerStrategy $strategy, $priority = 0)
    {
        $this->prioritizedStrategies[$priority][] = $strategy;
        $this->isSorted = false;
    }
212763
public void addGroup(CmsAdminMenuGroup group, float position) {

        m_groupContainer.addIdentifiableObject(group.getName(), group, position);
    }
510595
function callbackGroupRegister(\CharlotteDunois\Livia\Commands\CommandGroup $group) {
        foreach($this->settings as $guild => $settings) {
            if($guild !== 'global' && !$this->client->guilds->has($guild)) {
                continue;
            }
            
            $this->setupGuildGroup($guild, $group, $settings);
        }
    }