Add an attribute to the provided Span

@param string $attribute
@param string $value
@param array $options [optional] Configuration options.

@type Span $span The span to add the attribute to.
550135
public function addAttribute($attribute, $value, $options = [])
    {
        if (array_key_exists('span', $options)) {
            $options['spanId'] = $options['span']->spanId();
        }
        opencensus_trace_add_attribute($attribute, $value, $options);
    }
109542
public function addAttribute($attribute, $value, $options = [])
    {
        $this->tracer->addAttribute($attribute, $value, $options);
    }
1351927
public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }
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);
    }
277789
public static function option($value, $text, array $attributes = array())
    {
        if (!is_null($value)) {
            $attributes['value'] = $value;
        }

        $node = new Node\Option($text);
        return $node->render($attributes);
    }
136756
protected function setAttributes($options = array()) {
		if (is_array($options)) {
			foreach ($options as $attribute => $value) {
				$this->setAttribute($attribute, $value);
			}
		}
	}
286511
public function addAttr($name, $value)
    {
        if (!in_array($name, $this->attributes)) {
            $this->attributes[$name] = $value;
        }
        return $this;
    }
609351
public function yesNo($value, array $options = [], array $attributes = []) {
		$defaults = [
			'on' => 1,
			'onTitle' => __d('tools', 'Yes'),
			'offTitle' => __d('tools', 'No'),
		];
		$options += $defaults;

		if ($value == $options['on']) {
			$icon = 'yes';
			$value = 'on';
		} else {
			$icon = 'no';
			$value = 'off';
		}

		$attributes += ['title' => $options[$value . 'Title']];

		return $this->icon($icon, $options, $attributes);
	}
1075261
public function setMetadataAttr(string $attr, $value, array $options = [])
    {
        $this->getMetadata()->set($attr, $value, $options);

        return $this;
    }
372302
public function addAttribute($name, $value)
    {
        $nameUtf8 = $this->_toUTF8($name);
        $valueUtf8 = htmlspecialchars($this->_toUTF8($value), ENT_COMPAT, "UTF-8");
        if (($valueUtf8 === "") && (version_compare("5.2.2", PHP_VERSION, ">"))) {
            $this->_SimpleXmlElement->addAttribute($nameUtf8, "\0"); // Fixing bug #41175 (addAttribute() fails to add an attribute with an empty value)
        } else {
            $this->_SimpleXmlElement->addAttribute($nameUtf8, $valueUtf8);
        }
    }
645387
public function button($value = null, $options = [])
    {
        if (! array_key_exists('type', $options)) {
            $options['type'] = 'button';
        }

        return '<button'.$this->html->attributes($options).'>'.$value.'</button>';
    }
284432
public function addAttribute($attribute, $value)
    {
        $this->attributes[$attribute] = (string) $value;
        $this->eventHandler->attributeAdded($this, $attribute, $value);
    }
267596
public function changing($attribute, $value)
    {
        $this->setToken('Attribute', $attribute);
        $this->setToken('Value', $value);

        return $this;
    }
8792
public function setAttribute($attribute, $value){
        if($attribute === 'table'){
            $this->_table = $value;
        }
        elseif($attribute === 'pk'){
            $this->_pk = $value;
        }
        elseif($attribute === 'relations'){
            $this->_relations = $value;
        }
        
        return $this;
    }
850295
public function setAttribute($attribute, $value)
    {
        if (parent::setAttribute($attribute, $value)) {
            $this->options[$attribute] = $value;
            return true;
        }
        return false;
    }
1288851
public function addSpan($value)
    {
        if ($this->span === null) {
            $this->span = new \Protobuf\ScalarCollection();
        }

        $this->span->add($value);
    }
1256114
function set_attribute($name, $value){
		switch($name){
			case "id": 
				$this->set_id($value);
				break;
			case "text": 
				$this->data[$this->config->text[0]["name"]]=$value;
				break;
			case "checked": 
				$this->set_check_state($value);
				break;
			case "im0": 
				$this->im0=$value;
				break;
			case "im1": 
				$this->im1=$value;
				break;
			case "im2": 
				$this->im2=$value;
				break;
			case "child": 
				$this->set_kids($value);
				break;
			default:
				$this->attrs[$name]=$value;
		}
	}