public function assign($name, $val = null)
    {
        if (is_array($name)) {
            reset($name);
            foreach ($name as $k => $v){
                $this->data[$k] = $v;
            }
        } else {
            $this->data[$name] = $val;
        }
    }