@param ParticipantDto[] $participants

@return $this
510139
public function setParticipants($participants)
    {
        foreach ($participants as $key => $dtoData) {
            $this->participants[$key] = new ParticipantDto($dtoData);
        }
    
        return $this;
    }
582615
public function participant($summonerId)
	{
		$participant = $this->info['participants'];
		if (isset($participant[$summonerId]))
		{
			return $participant[$summonerId];
		}

		return null;
	}
915903
public function setEventManager(EventManagerInterface $events)
    {
        $identifiers = array(__CLASS__, get_called_class());
        if (isset($this->eventIdentifier)) {
            if ((is_string($this->eventIdentifier))
                || (is_array($this->eventIdentifier))
                || ($this->eventIdentifier instanceof Traversable)
            ) {
                $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
            } elseif (is_object($this->eventIdentifier)) {
                $identifiers[] = $this->eventIdentifier;
            }
            // silently ignore invalid eventIdentifier types
        }
        $events->setIdentifiers($identifiers);
        $this->events = $events;
        return $this;
    }
616470
public function setPayer(\Core\Entity\People $payer = null) {
        $this->payer = $payer;

        return $this;
    }
1087894
private function assertParticipantHasRole(ActivityInterface $activity, ParticipantInterface $participant)
    {
        if (!$participant->hasRole($activity->getRole()->getId())) {
            throw new AccessDeniedException(sprintf('The participant "%s" does not have the role "%s" that is required to operate the activity "%s".', $participant->getId(), $activity->getRole()->getId(), $activity->getId()));
        }
    }
169527
public function setParticipantIdentities($participantIdentities)
    {
        foreach ($participantIdentities as $key => $dtoData) {
            $this->participantIdentities[$key] = new ParticipantIdentityDto($dtoData);
        }
    
        return $this;
    }
347774
public function setInterfaces(array $interfaces): ClassDeclaration
    {
        $this->interfaces = [];
        foreach ($interfaces as $interface) {
            $this->addInterface($interface);
        }

        return $this;
    }
165341
public function addParticipant($params = [])
    {
        $response = Guzzle::post("tournaments/{$this->id}/participants", $params);

        $participant = new Participant($response->participant);
        $participant->tournament_slug = $this->id;

        return $participant;
    }
1326296
protected function setEventManager(EventManagerInterface $events): self
    {
        $events->setIdentifiers([__CLASS__, get_called_class()]);
        $this->events = $events;
        return $this;
    }
1336276
public function setRecipients($recipients)
    {
        // idiot proof patch
        if (is_string($recipients)) {
            $recipients = [$recipients];
        }

        if (!is_array($recipients)) {
            throw new \LogicException('$recipients parameter is expected to be an array or a string');
        }

        $this->initAddress($recipients, 'recipients');

        return $this;
    }
1140883
protected function sendGroupsChangeParticipants($groupId, $participant, $tag, $id)
    {
        $participants = new ProtocolNode('participant', ['jid' => $this->getJID($participant)], null, '');

        $childHash = [];
        $child = new ProtocolNode($tag, $childHash, [$participants], '');

        $node = new ProtocolNode('iq',
            [
                'id'    => $id,
                'type'  => 'set',
                'xmlns' => 'w:g2',
                'to'    => $this->getJID($groupId),
            ], [$child], '');

        $this->sendNode($node);
    }
310692
public function initiators($users = [])
    {
        if (empty($users)) {
            return $this;
        }
        $model = $this->noInitModel;
        return $this->andWhere([$model->createdByAttribute => BaseMongoEntityModel::compositeGUIDs($users)]);
    }
327115
public function sendGroupsParticipantsRemove($groupId, $participant)
    {
        $msgId = $this->createMsgId();
        $this->sendGroupsChangeParticipants($groupId, $participant, 'remove', $msgId);
    }
529217
public function setChildren($children)
    {
        $children = (array) $children;

        foreach ($children as $argument) {
            $this->addCommand($argument);
        }

        return $this;
    }
732902
public function setClients(array $clients = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$clients', $clients, __NAMESPACE__ . '\Client');

        $this->clients = $clients;

        return $this;
    }
162822
public function setupWithoutDealer(PlayerCollection $players): self
    {
        $collection = $this->setup($players);

        // move the dealer to last
        $collection = $collection->movePlayerToLastInQueue();

        return self::make($collection->values()->toArray());
    }
149905
public function sendGroupsParticipantsAdd($groupId, $participant)
    {
        $msgId = $this->createMsgId();
        $this->sendGroupsChangeParticipants($groupId, $participant, 'add', $msgId);
    }