set miscellaneous attribute of form

@param string $attr
@param string $value
@return HtmlForm
@throws HtmlFormException
184004
public function setAttribute($attr, $value) {

		$attr = strtolower($attr);

		switch($attr) {
			case 'action':
				$this->setAction($value);
				return $this;

			case 'enctype':
				$this->setEncType($value);
				return $this;

			case 'method':
				$this->setMethod($value);
				return $this;

			default:
				$this->attributes[$attr] = $value;
		}

		return $this;

	}
317393
public function setAttribute(string $name, string $value) : Tag
    {
        $this->attributes[strtolower($name)] = $value;

        return $this;
    }
846743
public function setAttribute($attribute, $value = null)
    {
        if ($attribute === 'class') {
            $this->addClass($value);

            return $this;
        }

        $this->attributes[$attribute] = $value;

        return $this;
    }
956993
public function withAttribute(string $name, $value): self
    {
        return new self(
            $this->decoratedResponse,
            $this->unformattedContent,
            [$name => $value] + $this->attributes
        );
    }
769183
private void setAttrValue(final AttrName _attrName,
                              final String _value)
    {
        synchronized (this.attrValues) {
            this.attrValues.put(_attrName, _value);
        }
    }
617651
public function setAttribute($attribute, $value)
    {
        if(is_null($value)) {
            unset($this->attributes[$attribute]);
        }
        else {
            $this->attributes[$attribute] = $value;
        }

        return $this;
    }
1137977
public function setColumnFormat($attr, $format = null)
    {
        $formats = is_array($attr)
            ? $attr
            : [$attr => $format];

        foreach ($formats as $a => $f)
            $this->_setSingleColumnFormat($a, $f);

        return $this;
    }
444728
public function setAttribute(int $attr, $value): bool
    {
        if ($attr === \PDO::ATTR_EMULATE_PREPARES) {
            if ($value !== false) {
                throw new \Exception(
                    'EasyDB does not allow the use of emulated prepared statements, ' .
                    'which would be a security downgrade.'
                );
            }
        }
        if ($attr === \PDO::ATTR_ERRMODE) {
            if ($value !== \PDO::ERRMODE_EXCEPTION) {
                throw new \Exception(
                    'EasyDB only allows the safest-by-default error mode (exceptions).'
                );
            }
        }
        return $this->pdo->setAttribute($attr, $value);
    }
334868
public function setAttribute($attribute, $value): Compound
    {
        if ($attribute !== 'link') {
            $this->attributes[$attribute] = $value;
        } else {
            $this->isLink = true;
            $this->link = $value;
        }

        return $this;
    }
1163461
public function attr($attribute, $value = null)
    {
        if (is_array($attribute)) return $this->attributes($attribute);
        if ($value) return $this->attributes(array($attribute => $value));
    }
358143
public function setAttribute($attribute, $value)
    {
        switch ($attribute) {
            case self::ATTR_DEFAULT_FETCH_MODE:
                $this->attributes['defaultFetchMode'] = $value;
                break;

            case self::ATTR_ERRMODE:
                $this->attributes['errorMode'] = $value;
                break;

            case self::ATTR_TIMEOUT:
                $this->attributes['timeout'] = (int)$value;
                break;

            case self::CRATE_ATTR_HTTP_BASIC_AUTH:
                if (!is_array($value) && $value !== null) {
                    throw new InvalidArgumentException(
                        'Value probided to CRATE_ATTR_HTTP_BASIC_AUTH must be null or an array'
                    );
                }

                $this->attributes['auth'] = $value;
                break;

            case self::CRATE_ATTR_DEFAULT_SCHEMA:
                $this->attributes['defaultSchema'] = $value;
                break;

            case self::CRATE_ATTR_SSL_MODE:
                $this->attributes['sslMode'] = $value;
                break;

            case self::CRATE_ATTR_SSL_CA_PATH:
                $this->attributes['sslCa'] = $value;
                break;

            case self::CRATE_ATTR_SSL_CA_PASSWORD:
                $this->attributes['sslCaPassword'] = $value;
                break;

            case self::CRATE_ATTR_SSL_CERT_PATH:
                $this->attributes['sslCert'] = $value;
                break;

            case self::CRATE_ATTR_SSL_CERT_PASSWORD:
                $this->attributes['sslCertPassword'] = $value;
                break;

            case self::CRATE_ATTR_SSL_KEY_PATH:
                $this->attributes['sslKey'] = $value;
                break;

            case self::CRATE_ATTR_SSL_KEY_PASSWORD:
                $this->attributes['sslKeyPassword'] = $value;
                break;

            default:
                throw new Exception\PDOException('Unsupported driver attribute');
        }

        // A setting changed so we need to reconfigure the server pool
        $this->server->configure($this);
    }
234139
public void setAttr(String attr) {
		String[] list = attr.split(";");
		for (int i = 0; i < list.length; ++i) {
			String[] val = list[i].split("=");
			if (val.length != 2)
				return ;
			getElement().setAttribute(val[0].trim(), val[1].trim());
		}
	}
1054255
public function attr($name, $value = NULL) {
    if (($el = $this->getElement()) === NULL) return NULL;

    if ($el->hasAttribute($name)) {
      if (func_num_args() == 2) {
        $el->setAttribute($name, $value);
      }

      return $el->getAttribute($name);
    }

    return NULL;
  }
938826
public function set($attr, $value)
    {
        $pk = self::getPK();
        // can't change the primary key of an existing record
        if (!$this->_new_rec && $attr == $pk) {
            return;
        }
        $this->_data[$attr] = $value;
    }
291679
public function set($attribute, $value=null) :self {
		// array is passed
		if(is_array($attribute)) {
			// for each associative value in the array
			foreach($attribute as $single_attribute => $single_value) {
				// recurse with a single pair or attribute/value
				$this->set($single_attribute, $single_value);
			}
			// return self
			return($this);
		}
		// specific case of text
		if($attribute == 'text') {
			// use the setter
			$this->setText($value);
		}
		// specific case of html
		elseif($attribute == 'html') {
			// use the setter
			$this->setHtml($value);
		}
		// specific case of style
		elseif($attribute == 'style' && is_array($value)) {
			// use the setter
			$this->setStyle($value);
		}
		// specific case of value
		elseif($attribute == 'value') {
			// use the setter
			$this->setValue($value);
		}
		// any normal attribute
		else {
			// if the value is an array we assemble its content or we set directly
			$this->attributes[$attribute] = is_array($value) ? implode(' ', $value) : $value;
		}
		// return self
		return($this);
	}
710103
protected function addAttr($label, $value, &$attr)
    {
        if (!isset($attr[$label])) {
            $attr[$label] = '';
        } else {
            $attr[$label] .= ' ';
        }
        $attr[$label] .= $value;

        return $this;
    }
68575
public function setAttr($attr, $value = null)
    {
        if (is_array($attr)) {
            $this->attr = array_merge($this->attr, $attr);

            return $this;
        }

        $this->attr[$attr] = $value;

        return $this;
    }