Add 'userdata' in PlWizard.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 6 Jan 2009 20:25:17 +0000 (21:25 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 6 Jan 2009 20:25:17 +0000 (21:25 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plwizard.php

index ab3dbca..06e6914 100644 (file)
@@ -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;