Skip to content

Commit

Permalink
Added Session::bind method, fixes #3164
Browse files Browse the repository at this point in the history
  • Loading branch information
Woody Gilk committed Aug 11, 2010
1 parent 306f719 commit 86febf1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions classes/kohana/session.php
Expand Up @@ -222,6 +222,22 @@ public function set($key, $value)
return $this;
}

/**
* Set a variable by reference.
*
* $session->bind('foo', $foo);
*
* @param string variable name
* @param mixed referenced value
* @return $this
*/
public function bind($key, & $value)
{
$this->_data[$key] =& $value;

return $this;
}

/**
* Removes a variable in the session array.
*
Expand Down

0 comments on commit 86febf1

Please sign in to comment.