示例#1
0
 public function __construct($type, $name, $param)
 {
     if (empty($type) || empty($name)) {
         throw new Exception("Bad arguments!");
     }
     $this->type = $type;
     $this->name = $name;
     $this->param = $param;
     parent::__construct();
 }
 public function __construct($type, $name, $param)
 {
     if (empty($type) || empty($name)) {
         throw new Exception("Bad arguments!");
     }
     $this->type = $type;
     $this->name = $name;
     $this->param = $param;
     $this->checked_value = isset($this->param[0]) ? $this->param[0] : '1';
     $this->prompt = @$this->param[1];
     parent::__construct();
 }
示例#3
0
 public function __construct($type, $name, $param)
 {
     if (empty($name)) {
         throw new Exception("Bad arguments!");
     }
     $this->type = $type;
     $this->name = $name;
     if (empty($param[0])) {
         throw new Exception("Empty checked value for radio button!");
     }
     $this->checked_value = $param[0];
     $this->param = $param;
     $this->prompt = @$this->param[1];
     parent::__construct();
 }
示例#4
0
 public function __construct($type, $name, $param)
 {
     if (empty($type) || empty($name)) {
         throw new Exception("Bad arguments!");
     }
     $this->type = $type;
     $this->name = $name;
     $this->param = $param;
     if (isset($this->param[0])) {
         $this->attr['size'] = $this->param[0];
     }
     if (isset($this->param['dir'])) {
         $this->attr['dir'] = $this->param['dir'];
     }
     parent::__construct();
 }
示例#5
0
 public function __construct($type, $name, $param)
 {
     if (empty($type) || empty($name)) {
         throw new Exception("Bad arguments!");
     }
     $this->type = $type;
     $this->name = $name;
     if (empty($param[0])) {
         $this->values = array();
     } else {
         $this->values = $param[0];
         unset($param[0]);
     }
     if (!empty($param[1])) {
         $this->default_value = $param[1];
     }
     $this->param = $param;
     parent::__construct();
 }