src/Recipient/ProcessedGroup.php
public function getContacts(Communicator $communicator = null): ClassValidationArray
    {
        if ($communicator !== null) {
            $contactStd = $communicator->get('api/groups/'.$this->groupID. '/contacts');
            $contactStd = json_decode($contactStd);
            $contacts = RecipientFactory::createProcessedGroupsFromStdClassArray($contactStd);
            $this->contacts = $contacts;
            $this->contactsFetched = true;
        }
        return $this->contacts;
    }
public function getContacts(Communicator $communicator = null): ClassValidationArray
    {
        if ($communicator !== null) {
            $contactStd = $communicator->get('api/groups/'.$this->groupID. '/contacts');
            $contactStd = json_decode($contactStd);
            $contacts = RecipientFactory::createProcessedGroupsFromStdClassArray($contactStd);
            $this->contacts = $contacts;
            $this->contactsFetched = true;
        }
        return $this->contacts;
    }
public function getContacts ( Communicator $ communicator = null ) : ClassValidationArray { if ( $ communicator !== null ) { $ contactStd = $ communicator -> get ( 'api/groups/' . $ this -> groupID . '/contacts' ) ; $ contactStd = json_decode ( $ contactStd ) ; $ contacts = RecipientFactory :: createProcessedGroupsFromStdClassArray ( $ contactStd ) ; $ this -> contacts = $ contacts ; $ this -> contactsFetched = true ; } return $ this -> contacts ; }
Returns an array of all the Contacts that belong to the Group.
If a communicator is not provided it will not fetch Contacts from the API
but return those that has been fetched, if any.
@param Communicator $communicator Used to fetch Contacts from the API.
@return ClassValidationArray An array of ProcessedContact objects.
Returns an array of all the Contacts that belong to the Group . If a communicator is not provided it will not fetch Contacts from the API but return those that has been fetched if any .