public function push($name, $value = null)
    {
        switch ($name) {
        case 'name':
            $this->setName($value);
            break;
        case 'type':
            break;
        case 'value':
            $this->setValue($value, true);
            break;
        case 'required':
            $this->required = true;
            break;
        case 'pattern':
        case 'regex':
            $this->regex = $value;
            $this->attributes['pattern'] = $value;
            break;
        case 'minlength':
            $this->minlength = $value;
            $this->attributes['minlength'] = $value;
            break;
        case 'maxlength':
            $this->maxlength = $value;
            $this->attributes['maxlength'] = $value;
            break;
        case 'mapping':
            $this->mapping = $value;
            break;
        case 'prettyname':
            $this->prettyname = $value;
            break;
        case 'readonly':
            $this->readonly = true;
            $this->attributes['readonly'] = 'readonly';
            break;
        default:
            if (preg_match('#^([a-z0-9_-]+)$#mUsi', $name)) {
                if (null !== $value) {
                    $this->setAttribute($name, $value);
                } else {
                    $this->setAttribute($name, $name);
                }
            }
        }
    }