示例#1
0
文件: Textarea.php 项目: robik/QForm
 public function __construct($name, $default = '', array $attributes = array())
 {
     parent::__construct('textarea');
     $this->setName($name);
     $this->appendText($default);
     $this->setAttributes($attributes);
 }
示例#2
0
文件: Option.php 项目: robik/QForm
 public function __construct($value, $text, array $attributes = array())
 {
     parent::__construct('option', $value);
     $this->setAttribute('value', $value);
     $this->appendText($text);
     $this->inline = true;
     $this->setAttributes($attributes);
 }
示例#3
0
文件: Label.php 项目: robik/QForm
 public function __construct($for, $text, array $attributes = array())
 {
     parent::__construct('label', $text);
     $this->inline = true;
     $this->setAttribute('for', $for);
     $this->appendText($text);
     $this->setAttributes($attributes);
 }
示例#4
0
文件: Form.php 项目: robik/QForm
 /**
  * Creates new form
  * 
  * @param string $target    Form target, as URI
  * @param string $method    Form method, post or get
  */
 public function __construct($target, $method = 'get', array $attributes = array())
 {
     parent::__construct('form');
     $this->setTarget($target);
     $this->setMethod($method);
 }
示例#5
0
文件: Select.php 项目: robik/QForm
 public function __construct($name, array $attributes = array())
 {
     parent::__construct('select');
     $this->setName($name);
     $this->setAttributes($attributes);
 }