src/Recipient/ProcessedGroup.php
public function getMemberships(Communicator $communicator = null): ClassValidationArray
    {
        if ($communicator !== null) {
            $membershipJSON = $communicator->get("api/groups/".$this->groupID."/memberships");
            $membershipStd = json_decode($membershipJSON);
            $memberships = [];
            foreach ($membershipStd as $value) {
                $memberships[] = RecipientFactory::createProcessedMembershipFromStdClass($value);
            }
            $this->memberships = $memberships;
            $this->fetchedMemberships = true;
        }
        return $this->memberships;
    }
public function getMemberships(Communicator $communicator = null): ClassValidationArray
    {
        if ($communicator !== null) {
            $membershipJSON = $communicator->get("api/groups/".$this->groupID."/memberships");
            $membershipStd = json_decode($membershipJSON);
            $memberships = [];
            foreach ($membershipStd as $value) {
                $memberships[] = RecipientFactory::createProcessedMembershipFromStdClass($value);
            }
            $this->memberships = $memberships;
            $this->fetchedMemberships = true;
        }
        return $this->memberships;
    }
public function getMemberships ( Communicator $ communicator = null ) : ClassValidationArray { if ( $ communicator !== null ) { $ membershipJSON = $ communicator -> get ( "api/groups/" . $ this -> groupID . "/memberships" ) ; $ membershipStd = json_decode ( $ membershipJSON ) ; $ memberships = [ ] ; foreach ( $ membershipStd as $ value ) { $ memberships [ ] = RecipientFactory :: createProcessedMembershipFromStdClass ( $ value ) ; } $ this -> memberships = $ memberships ; $ this -> fetchedMemberships = true ; } return $ this -> memberships ; }
Returns an array of all the memberships the group is referenced in.
If a communicator is not provided it will not fetch memberships from the API
but return those that has been fetched, if any.
@param Communicator $communicator Used to fetch memberships from the API.
@return array An array of Membership objects
Returns an array of all the memberships the group is referenced in . If a communicator is not provided it will not fetch memberships from the API but return those that has been fetched if any .