From a61df3888e726938f9f6b3af9cb4c8084907dfc6 Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sun, 12 Mar 2017 04:40:09 +0000 Subject: Allow important param injects to persist across all handler messages --- src/Message/Base.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Message/Base.php') 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 -- cgit v1.2.3