Allowing SessionComponent::write() to accept an associative array of keys/values

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3763 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-10-30 16:35:57 +00:00
parent b68181311c
commit 40381bf3ff

View file

@ -69,7 +69,13 @@ class SessionComponent extends Object{
* @param unknown_type $value
* @return unknown
*/
function write($name, $value) {
function write($name, $value = null) {
if (is_array($name)) {
foreach ($name as $key => $val) {
$this->CakeSession->writeSessionVar($key, $val);
}
return;
}
return $this->CakeSession->writeSessionVar($name, $value);
}
/**