summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php')
-rw-r--r--Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php b/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php
new file mode 100644
index 0000000..bfdb942
--- /dev/null
+++ b/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Model/Route/Action.php
@@ -0,0 +1,57 @@
+<?php
+
+/*
+ * Copyright (C) 2013-2016 Mailgun
+ *
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+namespace Mailgun\Model\Route;
+
+/**
+ * @author David Garcia <me@davidgarcia.cat>
+ */
+final class Action
+{
+ /**
+ * @var string
+ */
+ private $action;
+
+ /**
+ * Action Named Constructor to build several Action DTOs provided by an Array.
+ *
+ * @param array $data
+ *
+ * @return Action[]
+ */
+ public static function createMultiple(array $data)
+ {
+ $items = [];
+
+ foreach ($data as $action) {
+ $items[] = new self($action);
+ }
+
+ return $items;
+ }
+
+ /**
+ * Action Private Constructor.
+ *
+ * @param $action
+ */
+ private function __construct($action)
+ {
+ $this->action = $action;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAction()
+ {
+ return $this->action;
+ }
+}