diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Core/OwnableInterface.php | 12 | ||||
-rw-r--r-- | src/Recipient/ProcessedContact.php | 6 | ||||
-rw-r--r-- | src/Recipient/ProcessedGroup.php | 3 | ||||
-rw-r--r-- | src/Recipient/ProcessedMembership.php | 3 |
4 files changed, 21 insertions, 3 deletions
diff --git a/src/Core/OwnableInterface.php b/src/Core/OwnableInterface.php new file mode 100644 index 0000000..c54281b --- /dev/null +++ b/src/Core/OwnableInterface.php @@ -0,0 +1,12 @@ +<?php +namespace IP1\RESTClient\Core; + +interface OwnableInterface +{ + + /** + * Returns ID of account owning the implemented object. + * @return ID of account owning the implemented object. + */ + public function getOwnerID(): string; +} diff --git a/src/Recipient/ProcessedContact.php b/src/Recipient/ProcessedContact.php index 3aa5c1f..5a25e36 100644 --- a/src/Recipient/ProcessedContact.php +++ b/src/Recipient/ProcessedContact.php @@ -17,11 +17,15 @@ use IP1\RESTClient\Recipient\RecipientFactory; use IP1\RESTClient\Recipient\MembershipRelationInterface; use IP1\RESTClient\Core\Communicator; use IP1\RESTClient\Core\ClassValidationArray; +use IP1\RESTClient\Core\OwnableInterface; /** * A Contact that has been added to the API. Has all the options that a normal Contact has. */ -class ProcessedContact extends Contact implements UpdatableComponentInterface, MembershipRelationInterface +class ProcessedContact extends Contact implements + UpdatableComponentInterface, + MembershipRelationInterface, + OwnableInterface { /** * The ID of the Contact given by the API. diff --git a/src/Recipient/ProcessedGroup.php b/src/Recipient/ProcessedGroup.php index 8840bd3..87a14d2 100644 --- a/src/Recipient/ProcessedGroup.php +++ b/src/Recipient/ProcessedGroup.php @@ -15,11 +15,12 @@ use IP1\RESTClient\Core\Communicator; use IP1\RESTClient\Core\UpdatableComponentInterface; use IP1\RESTClient\Core\ClassValidationArray; use IP1\RESTClient\Recipient\ProcessedMembership; +use IP1\RESTClient\Core\OwnableInterface; /** * */ -class ProcessedGroup extends Group implements UpdatableComponentInterface, MembershipRelationInterface +class ProcessedGroup extends Group implements UpdatableComponentInterface, MembershipRelationInterface, OwnableInterface { /** * The ID of the Group given by the API. diff --git a/src/Recipient/ProcessedMembership.php b/src/Recipient/ProcessedMembership.php index 830354e..590ef0f 100644 --- a/src/Recipient/ProcessedMembership.php +++ b/src/Recipient/ProcessedMembership.php @@ -12,12 +12,13 @@ namespace IP1\RESTClient\Recipient; use IP1\RESTClient\Core\ProcessedComponentInterface; +use IP1\RESTClient\Core\OwnableInterface; /** * ProcessedMembership class. * Is the relation between contacts and groups. */ -class ProcessedMembership extends Membership implements ProcessedComponentInterface +class ProcessedMembership extends Membership implements ProcessedComponentInterface, OwnableInterface { /** |