30 if (!$this->label && !is_bool($this->label))
31 $this->label = ucfirst($this->name);
32 if (!is_object($this->cfg->value))
34 $this->
id = $this->
makeId($this->name);
35 $val = &$this->cfg->getRef(
'value');
38 'label'=>$this->label,
39 'validEltArray'=>$this->cfg->getInArray(
'valid',
'validEltArray'),
41 $this->cfg->delInArray(
'valid',
'validEltArray');
46 $this->
id = $this->
makeId($this->name);
57 array(
'[]',
'[',
']'),
67 return $this->cfg->name;
85 return $this->cfg->getRef(
'value');
94 public function setValue($value, $refill=
false) {
95 if ($this->cfg->disabled)
106 $ret = $this->cfg->description;
107 if ($this->cfg->outDescription)
116 $valid = $this->cfg->valid;
118 foreach(
$valid as $type=>$prm)
142 return $this->
valid->
isValid() && empty($this->customErrors);
155 return array_key_exists($name, $tmp) ? $tmp[$name] : null;
164 $this->cfg->disabled = $disabled;
166 $this->cfg->setInArray(
'html',
'disabled',
'disabled');
168 $this->cfg->delInArray(
'html',
'disabled');
186 $this->customErrors[] = $error;
223 return substr(get_class($this), strlen(
'form_'));
232 public function to($type) {
233 return $this->{
'to'.ucfirst($type)}();
239 abstract public function toHtml();
264 return $this->cfg->get($name);
273 public function __set($name, $val) {
274 $ret = $this->cfg->set($name, $val);
275 if ($name ==
'label' && $this->
getValid())
276 $this->
getValid()->getCfg()->label = $val;
static htmlOut($val, $key=false)
static htmlDeOut($val, $key=false)
addRule($type, $prm=null, $msg=null)
static get($className, array $cfg=array())