From: Florent Bruneau Date: Tue, 6 Jan 2009 20:25:17 +0000 (+0100) Subject: Add 'userdata' in PlWizard. X-Git-Tag: core/1.0.1~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=1ec4547fd552aac8b7ec8720893c2c03a808ff61;p=platal.git Add 'userdata' in PlWizard. Signed-off-by: Florent Bruneau --- 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;