summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHannes Kindströmmer <hannes@kindstrommer.se>2017-03-21 10:34:55 +0100
committerHannes Kindströmmer <hannes@kindstrommer.se>2017-03-21 11:35:46 +0100
commitd26b75dbb5967e9d0fa67e7d247b113668a8c075 (patch)
tree8f0b89ee0e17afecc2b8ff2166b2b318ec47f426 /src
parent4fc297abe0cfe20047396b5c2e68546bf64d038a (diff)
downloadip1-php-sdk-d26b75dbb5967e9d0fa67e7d247b113668a8c075.zip
ip1-php-sdk-d26b75dbb5967e9d0fa67e7d247b113668a8c075.tar.gz
ip1-php-sdk-d26b75dbb5967e9d0fa67e7d247b113668a8c075.tar.bz2
Add OwnableInterface
Signed-off-by: Hannes Kindströmmer <hannes@kindstrommer.se>
Diffstat (limited to 'src')
-rw-r--r--src/Core/OwnableInterface.php12
-rw-r--r--src/Recipient/ProcessedContact.php6
-rw-r--r--src/Recipient/ProcessedGroup.php3
-rw-r--r--src/Recipient/ProcessedMembership.php3
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
{
/**