diff options
author | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-02-28 16:33:20 +0100 |
---|---|---|
committer | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-02-28 16:35:41 +0100 |
commit | d58034be047cbe09136aea8caef8f1cb6735f46c (patch) | |
tree | 55ac235a4718559e24603eef87b471caacce4429 /src | |
parent | c0135fa987490a08e57163386166d4fa7b00a208 (diff) | |
download | ip1-php-sdk-d58034be047cbe09136aea8caef8f1cb6735f46c.zip ip1-php-sdk-d58034be047cbe09136aea8caef8f1cb6735f46c.tar.gz ip1-php-sdk-d58034be047cbe09136aea8caef8f1cb6735f46c.tar.bz2 |
Fixed autoloading and correced namespaces
Diffstat (limited to 'src')
-rw-r--r-- | src/SMS/LoggedOutGoingSMS.php | 6 | ||||
-rw-r--r-- | src/SMS/OutGoingSMS.php | 10 | ||||
-rw-r--r-- | src/SMS/ProcessedOutGoingSMS.php | 4 | ||||
-rw-r--r-- | src/SMS/SMS.php | 4 |
4 files changed, 11 insertions, 13 deletions
diff --git a/src/SMS/LoggedOutGoingSMS.php b/src/SMS/LoggedOutGoingSMS.php index 2e3b5ee..f8c3ee5 100644 --- a/src/SMS/LoggedOutGoingSMS.php +++ b/src/SMS/LoggedOutGoingSMS.php @@ -1,8 +1,8 @@ <?php -use \IP1\RESTClient\Core\UpdatableComponent; +use IP1\RESTClient\Core\UpdatableComponent; -namespace \IP1\RESTClient\SMS; +namespace IP1\RESTClient\SMS; class LoggedOutGoingSMS extends ProcessedOutGoingSMS implements UpdatableComponent { @@ -25,7 +25,7 @@ class LoggedOutGoingSMS extends ProcessedOutGoingSMS implements UpdatableCompone } public function jsonSerialize(): \stdClass { - $returnObject = parent::toStdClass(); + $returnObject = parent::jsonSerialize(); $returnObject->UpdatedDate = $this->updated; $returnObject->CreatedDate = $this->created; return $returnObject; diff --git a/src/SMS/OutGoingSMS.php b/src/SMS/OutGoingSMS.php index e1db27c..a0b6ffc 100644 --- a/src/SMS/OutGoingSMS.php +++ b/src/SMS/OutGoingSMS.php @@ -1,8 +1,8 @@ <?php -use \IP1\RESTClient\Recipient\Contact; -use \IP1\RESTClient\Recipient\Group; +use IP1\RESTClient\Recipient\Contact; +use IP1\RESTClient\Recipient\Group; -namespace \IP1\RESTClient\SMS; +namespace IP1\RESTClient\SMS; class OutGoingSMS extends SMS implements \JsonSerializable { @@ -26,12 +26,12 @@ class OutGoingSMS extends SMS implements \JsonSerializable public function jsonSerialize(): \stdClass { - $returnObject = parent::toStdClass(); + $returnObject = parent::jsonSerialize(); $returnObject->Email = $this->email; if (count($this->numbers) > 0) { $returnObject->Numbers = $this->numbers; } - if (count($this-contacts) > 0) { + if (count($this->contacts) > 0) { $returnObject->Contacts = []; foreach ($this->contacts as $contact) { $returnObject->Contacts[] = $contact->getID(); diff --git a/src/SMS/ProcessedOutGoingSMS.php b/src/SMS/ProcessedOutGoingSMS.php index aa0324d..01a65cc 100644 --- a/src/SMS/ProcessedOutGoingSMS.php +++ b/src/SMS/ProcessedOutGoingSMS.php @@ -1,7 +1,7 @@ <?php -namespace \IP1\RESTClient\SMS; +namespace IP1\RESTClient\SMS; class ProcessedOutGoingSMS extends OutGoingSMS { @@ -28,7 +28,7 @@ class ProcessedOutGoingSMS extends OutGoingSMS } public function jsonSerialize(): \stdClass { - $returnObject = parent::toStdClass(); + $returnObject = parent::jsonSerialize(); if (!empty($this->bundleID)) { $returnObject->BundleID = $this->bundleID; } diff --git a/src/SMS/SMS.php b/src/SMS/SMS.php index 183cd21..0e4ad34 100644 --- a/src/SMS/SMS.php +++ b/src/SMS/SMS.php @@ -1,8 +1,6 @@ <?php -use IP1\RESTClient\Core\Component; - -namespace \IP1\RESTClient\SMS; +namespace IP1\RESTClient\SMS; abstract class SMS implements \JsonSerializable { |