Skip to content

Commit

Permalink
let Template&addContext() take another template instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Brennen Bearnes committed Oct 28, 2012
1 parent f7a2d4b commit 220a2b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ public function setContext ($context = array())
*/
public function addContext ($context = array())
{
if ($context instanceof Template)
$context = $template->getContext();

foreach ($context as $key => $val) {
$this->__set($key, $val);
}
Expand Down

0 comments on commit 220a2b6

Please sign in to comment.