summaryrefslogtreecommitdiff
path: root/src/Message/Base.php
diff options
context:
space:
mode:
authorFbenas <philbeansburton@gmail.com>2017-03-12 04:40:09 +0000
committerFbenas <philbeansburton@gmail.com>2017-03-12 04:40:09 +0000
commita61df3888e726938f9f6b3af9cb4c8084907dfc6 (patch)
treeb5c9b870023a817cecf31d282c2639e192289b6a /src/Message/Base.php
parent78bb09f1ab50b85ec000e4d61cc795f03325cd11 (diff)
Allow important param injects to persist across all handler messages
Diffstat (limited to 'src/Message/Base.php')
-rw-r--r--src/Message/Base.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Message/Base.php b/src/Message/Base.php
index a4430da..4565de9 100644
--- a/src/Message/Base.php
+++ b/src/Message/Base.php
@@ -69,4 +69,13 @@ class Base
return $out;
}
+
+ public function setFromArray(array $array)
+ {
+ foreach ($array as $key => $value) {
+ if (in_array($key, $this->injects)) {
+ $this->$key = (string) $value;
+ }
+ }
+ }
} \ No newline at end of file