From 2161b397aac8bdc40c89ef49fc7fda9530fa7c5c Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Mon, 24 Oct 2016 14:22:53 -0700
Subject: [PATCH] Issue #1946 - added getMeta() setMeta() and removeMeta()
 methods.

---
 e107_handlers/application.php | 52 +++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/e107_handlers/application.php b/e107_handlers/application.php
index 5e18501d1..a32d9ae14 100644
--- a/e107_handlers/application.php
+++ b/e107_handlers/application.php
@@ -3804,6 +3804,46 @@ class eResponse
 		$this->_body[$ns] = $body;
 		return $this;
 	}
+
+
+	/**
+	 * @param $name
+	 * @param $content
+	 * @return $this
+	 */
+	public function setMeta($name, $content)
+	{
+		foreach($this->_meta as $k=>$v)
+		{
+			if($v['name'] === $name)
+			{
+				$this->_meta[$k]['content'] = $content;
+			}
+		}
+
+		return $this;
+
+	}
+
+
+	/**
+	 * @param $name
+	 * @return $this
+	 */
+	public function removeMeta($name)
+	{
+		foreach($this->_meta as $k=>$v)
+		{
+			if($v['name'] === $name)
+			{
+				unset($this->_meta[$k]);
+			}
+		}
+
+		return $this;
+
+	}
+
 	
 	/**
 	 * Prepend content
@@ -4060,6 +4100,18 @@ class eResponse
 		return '';
 	}
 
+
+
+	/**
+	 * Return an array of all meta data
+	 * @return array
+	 */
+	function getMeta()
+	{
+		return $this->_meta;
+	}
+
+
 	/**
 	 * @param string $title
 	 * @return eResponse