Adds a component to the distinguished name.

@param string $component
@param string $value

@throws \UnexpectedValueException When the given name does not exist.
7756
protected function addComponent($component, $value)
    {
        $this->validateComponentExists($component);

        // We need to make sure the value we're given isn't empty before adding it into our components.
        if (! empty($value)) {
            $this->components[$component][] = $value;
        }
    }
693499
protected function addHeaderValue(string $name, $value)
    {
        if (!is_scalar($value)) {
            throw new IllegalHeaderValueException($value);
        }

        if (!array_key_exists($name, $this->headersContainer)) {
            $this->headersContainer[$name] = [];
        }

        $this->headersContainer[$name][] = $value;

        return $this;
    }
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);
        }
    }
1258689
public function set($key, $value)
    {
        if ($this->isProtected($key)) {

            throw new \UnexpectedValueException("Cannot set value in protected '$key' item");
        }

        return parent::set($key, $value);
    }
506152
final public static function create($value)
    {
        $key = get_called_class() . $value;

        if (isset(self::$instances[$key])) {
            return self::$instances[$key];
        }

        $values = static::values();
        if (!in_array($value, $values)) {
            throw new \UnexpectedValueException("Value '$value' is not part of the enum " . get_called_class());
        }

        self::$instances[$key] = new static($value);
        return self::$instances[$key];
    }
27955
public function setValue($value)
    {
        if (!$this->isValid($value)) {
            throw new \UnexpectedValueException("Value '$value' is not part of the enum ".get_called_class());
        }
        $this->value = $value;
    }
48019
private void addElement(String value) {
        if (null == value) {
            return;
        }
        this.num_items++;
        this.genericValues.add(value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "addElement: " + value + " num: " + this.num_items);
        }
    }
6360
public function remove($value)
    {
        if (!is_string($value)) {
            throw new UnexpectedTypeException($value, 'string', 'value');
        }
        if (empty($value)) {
            return;
        }

        if ($this->allowTokenize) {
            $this->values = array_diff($this->values, explode($this->delimiter, $value));
        } else {
            $this->values = array_diff($this->values, [$value]);
        }
    }
771937
public function setValue($value)
    {
        $this->value = $value;
        if ($value instanceof ValueAwareInterface) {
            $this->value = $value->getFormValue();
        }
        return $this;
    }
721136
public function add(HtmlComponent $component)
    {

        if (isset($this->components[$component->id]) || isset($this->components[$component->id . ":" . $this->number])) {
            //   $id = substr($component->id,0,strpos($component->id,':'));
            //   $pid = substr($this->id,0,strpos($this->id,':'));
            throw new ZE(sprintf(ERROR_DATAROW_COMPONENT_EXISTS, $component->id, $pid));
        }
        $this->components[$component->id] = $component;
        $component->setOwner($this);
        return $component;
    }
363916
public function add($name, $value = null)
    {
        $name = self::normalizeName($name);
        $value = self::normalizeValue($value);

        if (!isset($this->parameters[$name])) {
            $this->parameters[$name] = [];
        } elseif (!is_array($this->parameters[$name])) {
            $this->parameters[$name] = (array) $this->parameters[$name];
        }

        $this->parameters[$name][] = $value;
    }
8484
public function add(string $name, string $value): void
    {
        $header = $this->make();
        $header->name = $name;
        $header->value = $value;
        $this->set($header);
    }
1276940
public function addValue($value)
    {
        if ($this->datatype == 'string') {
            if (is_string($value) == false) {
                throw new InvalidArgumentException('The value(' . $value . ') is not string but the restriction demands it');
            }
        } elseif ($this->datatype == 'integer') {
            // The value comes as string from the wsdl
            if (is_string($value)) {
                $value = intval($value);
            }

            if (is_int($value) == false) {
                throw new InvalidArgumentException('The value(' . $value . ') is not int but the restriction demands it');
            }
        } else {
            if ($value == null) {
                throw new InvalidArgumentException('Value(' . $value . ') is null');
            }
        }

        $this->values[] = $value;
    }
1282481
protected function addHeader(string $name, $value): Headers
    {
        if (!is_scalar($value) && !is_array($value)) {
            throw new IllegalHeaderValueException($value);
        }

        if (is_scalar($value)) {
            $this->addHeaderValue($name, $value);

            return $this;
        }

        foreach ($value as $item) {
            $this->addHeaderValue($name, $item);
        }

        return $this;
    }
611316
public function define($key, $value)
    {

        if ($this->isProtected($key)) {

            throw new \UnexpectedValueException("Cannot re-assing protected '$key' item");
        }

        parent::set($key, $value);

        $this->protect($key);

        return $this;
    }
1108836
public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!is_string($value)) {
            throw new UnexpectedTypeException($value, 'string');
        }

        return true;
    }
101071
public function setComponentParameter(string $componentClassName, string $parameterName, $value): void
    {
        if (!isset($this->componentParameters[$componentClassName])) {
            $this->componentParameters[$componentClassName] = [];
        }
        $this->componentParameters[$componentClassName][$parameterName] = $value;
    }