From 1ec4547fd552aac8b7ec8720893c2c03a808ff61 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 6 Jan 2009 21:25:17 +0100 Subject: [PATCH] Add 'userdata' in PlWizard. Signed-off-by: Florent Bruneau --- classes/plwizard.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/plwizard.php b/classes/plwizard.php index ab3dbca..06e6914 100644 --- a/classes/plwizard.php +++ b/classes/plwizard.php @@ -64,6 +64,8 @@ class PlWizard const PREVIOUS_PAGE = 'bt_previous'; const LAST_PAGE = 'bt_last'; + private $userdata = array(); + protected $name; protected $layout; protected $stateless; @@ -101,6 +103,16 @@ class PlWizard $this->titles[] = $title; } + public function addUserData($name, $value) + { + $this->userdata[$name] = $value; + } + + public function getUserData($name, $default = null) + { + return $this->userdata[$name]; + } + public function set($varname, $value) { $_SESSION[$this->name][$varname] = $value; -- 2.1.4