From edbf7f3b0f898a0d3fdfa6f4ccc5341a4a5ce9dd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 11 Jun 2011 23:13:35 -0500 Subject: [PATCH] added with method to view class. --- system/view.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/system/view.php b/system/view.php index 7844ed44..48c3229b 100644 --- a/system/view.php +++ b/system/view.php @@ -83,6 +83,18 @@ public function bind($key, $value) return $this; } + /** + * Merge an array into the view data. + * + * @param array $data + * @return View + */ + public function with($data) + { + $this->data = array_merge($this->data, $data); + return $this; + } + /** * Get the parsed content of the view. *