Adds a new attribute - and replace "&" by "&amp;" on the way ...

@param string $name Name of the attribute
@param string $value The value to set, if any
@param string $namespace The namespace, if any
@return void
765350
public function addAttribute($name, $value = null, $namespace = null)
    {
        parent::addAttribute($name, ($value !== null ? str_replace('&', '&amp;', $value) : null), $namespace);
    }
198237
public function addChild($name, $value = null, $namespace = null)
    {
        return parent::addChild($name, ($value !== null ? str_replace('&', '&amp;', $value) : null), $namespace);
    }
547987
public function addAttr($name, $value)
    {
        $name = trim($name);
        $value = trim($value);

        if ($value && !$this->existsAttr($name)) {
            $this->attrs[$name] = $value;
        }

        return $this;
    }
342494
public function setAttribute(string $name, $value): void
	{
		Arr::set($this->attributes, $name, $value);
	}
328348
public function add($name, $value)
    {
        $this->requireNames();
        $value = $this->normalizeValue($value);
        
        $lower = strtolower($name);
        if(array_key_exists($lower, $this->names)) {
            $name = $this->names[$lower];
            foreach($value as $line) {
                $this->headers[$name][] = $line;
            }
        }else{
            $this->setHeader($name, $value);
        }
    }
1136721
public function setTo($namespace, $key, $value = null)
    {
        $oldNamespace = $this->namespace;
        $this->setNamespace($namespace);
        $this->set($key, $value);
        $this->setNamespace($oldNamespace);
    }
301872
public function add($name, $value)
    {
        $setting = $this->getPath($name);
        $key     = $this->getClassName($name);

        // If the current key doesn't exist in the settings array, set it up
        if (!array_key_exists($name, $this->settings)) {
            $this->settings[$key] = new $setting();
        }

        $this->settings[$key]->add($value);
    }
860436
protected function _pushAttrValue(string $name, $value, bool $addValue = false): void {
        $this->collection()->each(function($node, $index) use($name, $value, $addValue) {
            if ($node instanceof \DOMElement) {
                $attr = $node->getAttribute($name);

                if (is_callable($value)) {
                    $value = $value($node, $index, $attr);
                }

                // Remove any existing instances of the value, or empty values.
                $values = array_filter(explode(' ', $attr), function($_value) use($value) {
                    if (strcasecmp($_value, $value) == 0 || empty($_value)) {
                        return false;
                    }

                    return true;
                });

                // If required add attr value to array
                if ($addValue) {
                    $values[] = $value;
                }

                // Set the attr if we either have values, or the attr already
                //  existed (we might be removing classes).
                //
                // Don't set the attr if it doesn't already exist.
                if (!empty($values) || $node->hasAttribute($name)) {
                    $node->setAttribute($name, implode(' ', $values));
                }
            }
        });
    }
758313
public function appendAttr(string $name, string $value, string $separator = ';')
    {

        if (isset($this->attr[$name])) {
            $this->attr[$name] .= ($separator . $value);
        } else {
            $this->attr[$name] = $value;
        }

        return $this;
    }
1205145
public function addAttribute($name, $value = null, $namespace = null)
    {
        if (isset($value)) {
            parent::addAttribute($name, $value, $namespace);
        }
    }
1228487
public function setAttribute( $name, $value )
    {
        if ( isset( $this->dynamicAttributeFunctions[$name] ) )
        {
            switch ( $name )
            {
                case 'valid_nodes':
                    $this->dynamicAttributeFunctions[$name] = $value;
                    break;
                default:
                break;
            }
        }
        else
        {
            $this->attributes[$name] = $value;
        }
    }
1089710
public function attribute($name, $value=null)
    {
        if ($value === null) {
            unset($this->_attributes[$name]);
        } else {
            $this->_attributes[$name] = $value;
        }
    }
497947
protected function addOption(string $name, string $value): void
    {
        $this->options[$name] = $value;
    }
174465
public function addAttribute($name, $value)
    {
        if ($name === 'class') {
            $this->addAttributeClass($value);
        } elseif ($name === 'style') {
            $value = rtrim($value, ';') . ';';
            $value = explode(';', $value);
            $value = array_filter($value);

            foreach ($value as $style) {
                if (preg_match_all("/(.*)(: )(.*)/", $style, $match)) {
                    $this->addAttributeStyle($match[ 1 ][ 0 ], $match[ 3 ][ 0 ]);
                } elseif (preg_match_all("/(.*)(:)(.*)/", $style, $match)) {
                    $this->addAttributeStyle($match[ 1 ][ 0 ], $match[ 3 ][ 0 ]);
                }
            }
        } elseif (is_string($value)) {
            $this->storage[ $name ] = trim($value);
        } else {
            $this->storage[ $name ] = $value;
        }

        return $this;
    }
8484
public function add(string $name, string $value): void
    {
        $header = $this->make();
        $header->name = $name;
        $header->value = $value;
        $this->set($header);
    }
447980
function setAttribute( $name, $value )
    {
        parent::setAttribute( $name, $value );
        if ( $name == 'text' )
        {
            $this->TextMD5 = md5( eZURLAliasML::strtolower( $value ) );
        }
        else if ( $name == 'action' )
        {
            $this->ActionType = null;
        }
    }
1166110
public function addOptionalHeader($name, $value)
    {
        Validate::isString($name, 'name');
        Validate::isString($value, 'value');

        if (!empty($value)) {
            $this->_headers[$name] = $value;
        }
    }