Gets the audiences.

@return array @audience The valid audiences of the response
333050
public function getAudiences()
    {
        $audiences = array();

        $entries = $this->_queryAssertion('/saml:Conditions/saml:AudienceRestriction/saml:Audience');
        foreach ($entries as $entry) {
            $value = trim($entry->textContent);
            if (!empty($value)) {
                $audiences[] = $value;
            }
        }

        return array_unique($audiences);
    }
445392
public function get()
    {
        $notifications = $this->stack->getNotifications()->get();
        $alerts        = $this->stack->getAlerts()->get();
        $count         = $this->stack->getCount();
        $return        = [
            'notifications' => [
                'items' => $this->decorator->decorate($notifications),
                'count' => array_get($count, 'notifications', 0),
            ],
            'alerts'        => [
                'items' => $this->decorator->decorate($alerts, 'alert'),
                'count' => array_get($count, 'alerts', 0)
            ],
        ];
        return new JsonResponse($return, 200);
    }
342085
public function getTokens()
    {
        $response = $this->client->post($this->uri());

        return $this->handleResponse($response);
    }
1039424
protected function getCallback()
    {
        if (!array_key_exists($this->topicName, self::$topics)) {
            $client = new PubSubClient($this->getUnwrappedClientConfig());
            self::$topics[$this->topicName] = $client->topic($this->topicName);
        }

        return [self::$topics[$this->topicName], $this->batchMethod];
    }
873807
public function getActiveUsers()
    {
        $data = $this->call('apps/' . $this->appId . '/activeusers', [], 'get');

        $array = [];
        foreach ($data as $msg) {
            $array[] = User::fromResponse($msg);
        }

        return $array;
    }
869290
public static function list_current_versions($audience = null) {

        $current = [];

        foreach (static::list_policies() as $policy) {
            if (empty($policy->currentversion)) {
                continue;
            }
            if ($audience && !in_array($policy->currentversion->audience, [policy_version::AUDIENCE_ALL, $audience])) {
                continue;
            }
            $current[] = $policy->currentversion;
        }

        return $current;
    }
1249744
public function getMessages()
    {
        if (empty($this->messages)) {
            $message = $this->event->get('message');
            $userId = $this->event->get('userId');
            $sender = $this->event->get('sender', $userId);

            $incomingMessage = new IncomingMessage($message, $sender, $userId, $this->payload);

            $incomingMessage = $this->addAttachments($incomingMessage);

            $this->messages = [$incomingMessage];
        }

        return $this->messages;
    }
986589
public function getGroups()
    {
        $request = new Request\GetGroupsRequest($this->getCredential());
        $response = $this->sendRequest($request);

        return Request\GetGroupsRequest::parseResponse($response);
    }
605408
public function getInvocations(): array
    {
        if (empty($this->invocations)) {
            $this->locateInvocations($this->getTokens());
        }

        return $this->invocations;
    }
249806
public function getCasts()
	{
		if ( $this->getIncrementing() )
		{
			return array_merge( [
				$this->getKeyName() => $this->keyType,
			], $this->casts );
		}

		return $this->casts;
	}
142072
public function getCasts()
    {
        if ($this->getIncrementing()) {
            return array_merge([
                $this->getKeyName() => $this->getKeyType(),
            ], $this->casts);
        }

        return $this->casts;
    }
1209882
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['activated']))
		{
			$result['activated'] = $this->getActivatedAttribute($result['activated']);
		}
		if (isset($result['permissions']))
		{
			$result['permissions'] = $this->getPermissionsAttribute($result['permissions']);
		}
		if (isset($result['suspended_at']))
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
290835
private function getVoters()
    {
        // we have 2 built in voters
        $voters = $this->servicesByTag('Security.Voter', VoterInterface::class);
        $voters[] = new AuthenticationVoter();
        $voters[] = new RoleVoter();

        return $voters;
    }
1237991
public function get(): array
    {
        $pdoStatement = $this->provideStatement();
        $pdoStatement = $this->execute($pdoStatement);
        return $pdoStatement->fetchAll(\PDO::FETCH_OBJ);
    }
689876
public static function map()
    {
        return [
            AudienceUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-audience-updated+json',
            BookingInfoUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-booking-info-updated+json',
            PriceInfoUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-price-info-updated.json',
            ContactPointUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-contact-point-updated+json',
            DescriptionTranslated::class => 'application/vnd.cultuurnet.udb3-events.event-description-translated+json',
            DescriptionUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-description-updated+json',
            EventCreated::class => 'application/vnd.cultuurnet.udb3-events.event-created+json',
            EventCopied::class => 'application/vnd.cultuurnet.udb3-events.event-copied+json',
            EventDeleted::class => 'application/vnd.cultuurnet.udb3-events.event-deleted+json',
            EventImportedFromUDB2::class => 'application/vnd.cultuurnet.udb3-events.event-imported-from-udb2+json',
            EventProjectedToJSONLD::class => 'application/vnd.cultuurnet.udb3-events.event-projected-to-jsonld+json',
            EventUpdatedFromUDB2::class => 'application/vnd.cultuurnet.udb3-events.event-updated-from_udb2+json',
            ImageAdded::class => 'application/vnd.cultuurnet.udb3-events.event-image-added+json',
            ImageRemoved::class => 'application/vnd.cultuurnet.udb3-events.event-image-removed+json',
            ImageUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-image-updated+json',
            LabelAdded::class => 'application/vnd.cultuurnet.udb3-events.event-label-added+json',
            LabelRemoved::class => 'application/vnd.cultuurnet.udb3-events.event-label-removed+json',
            MainImageSelected::class => 'application/vnd.cultuurnet.udb3-events.event-main-image-selected+json',
            MajorInfoUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-major-info-updated+json',
            LocationUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-location-updated+json',
            GeoCoordinatesUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-geocoordinates-updated+json',
            CalendarUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-calendar-updated+json',
            OrganizerDeleted::class => 'application/vnd.cultuurnet.udb3-events.event-organizer-deleted+json',
            OrganizerUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-organizer-updated+json',
            TitleTranslated::class => 'application/vnd.cultuurnet.udb3-events.event-title-translated+json',
            TitleUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-title-updated+json',
            TypicalAgeRangeUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-typical-age-range-updated+json',
            TypicalAgeRangeDeleted::class => 'application/vnd.cultuurnet.udb3-events.event-typical-age-range-deleted+json',
            TypeUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-type-updated+json',
            ThemeUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-theme-updated+json',
            FacilitiesUpdated::class => 'application/vnd.cultuurnet.udb3-events.event-facilities-updated+json',
            // Moderation
            Published::class => 'application/vnd.cultuurnet.udb3-events.moderation.event-published+json',
            Approved::class => 'application/vnd.cultuurnet.udb3-events.moderation.event-approved+json',
            Rejected::class => 'application/vnd.cultuurnet.udb3-events.moderation.event-rejected+json',
            FlaggedAsDuplicate::class => 'application/vnd.cultuurnet.udb3-events.moderation.event-flagged-as-duplicate+json',
            FlaggedAsInappropriate::class => 'application/vnd.cultuurnet.udb3-events.moderation.event-flagged-as-inappropriate+json',
            Concluded::class => 'application/vnd.cultuurnet.udb3-events.event-concluded+json',
        ];
    }
443894
public function pollMessages()
    {
        $request = new Request\PollMessagesRequest($this->getCredential());
        $response = $this->sendRequest($request);

        return Request\PollMessagesRequest::parseResponse($response);
    }
291680
public function getResponseHeaders() {
        $requestHeaders = [];

        if ($this->headers instanceof \ArrayAccess) {
            while ($this->headers->valid()) {
                $requestHeaders[$this->headers->key()] = $this->headers->current();
                $this->headers->next();
            }
        }

        return $requestHeaders;
    }