Add field into schema.

@param string $name
@param mixed  $value
343067
public function addField(string $name, $value)
    {
        $schema = $this->constant('SCHEMA')->getValue();
        $schema[$name] = $value;
        $this->constant('SCHEMA')->setValue($schema);
    }
92289
public function addField($id, $value, $name = null)
    {
        $field = $this->_service->newField($id, $value, $name);
        return $this->attachField($field);
    }
422027
public function setFieldValue($name, $value)
    {
        foreach ($this->fieldsets as $fieldset) {
            if (isset($fieldset[$name])) {
                $fieldset[$name] = $value;
            }
        }
        return $this;
    }
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));
                }
            }
        });
    }
108405
private function setMutated(string $name, $value)
    {
        $setter = $this->getMutator($name, self::MUTATOR_SETTER);

        if (!empty($setter)) {
            try {
                $this->fields[$name] = call_user_func($setter, $value);
            } catch (\Exception $e) {
                //Exceptional situation, we are choosing to keep original field value
            }
        } else {
            $this->fields[$name] = $value;
        }
    }
1192946
protected function addParamsOption($name, $value)
    {
        if (is_array($value) && count($value)) {
            $this->addOption('content', $name, $value);
        }
    }
1293408
private function SetInternally($name, $value)
    {
        $schema = $this->GetSchema();
        $mapper = $schema->FieldMapper($name);
        $this->fieldValues[$name] = $mapper->MapValue($value);
    }
52998
public function addAttribute($name, $value) {
        $this->setVariable(self::ATTRIBUTES, $this->addValue($this->getVariable(self::ATTRIBUTES), $this->assembleAssignmentString($name, $value)));
    }
261392
public function add($name, $value = '')
    {
        Types::assert(['string' => [$name, $value]]);

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

        $this->headers[$key][] = HeaderFactory::build($name, $value);
    }
548406
public function insertRecord($name, $value)
    {
        if ($this->isRecordZero($value)) {
            return false;
        }

        $tableName = $this->getTableNameToInsert($value);
        $fields    = $this->getInsertFields();
        $record    = $this->getInsertRecordBind();

        $this->getModel()->insertRecord($tableName, $fields, $record, $name, $value);

        return true;
    }
837028
public function addField(string $name, string $value, string $contentType = 'text/plain') {
        $this->fields[] = [$name, $value, $contentType, null];
        $this->resetCache();
    }
221739
public function append($name, $value)
    {
        if (is_array($this->_data[$name])) {
            $this->_data[$name][] = $value;
        } else {
            $this->_data[$name] .= $value;
        }

        return $this;
    }
155397
protected function addValue(&$fieldsArray, $name, $value)
    {
        $arrayCheck = substr($name, -2);

        if ($arrayCheck == '[]') {
            $nameSubstr = substr($name, 0, -2);
            if (!isset($fieldsArray[$nameSubstr]))
                $fieldsArray[$nameSubstr] = [];

            $fieldsArray[$nameSubstr][] = $value;
        } else {
            $fieldsArray[$name] = $value;
        }
    }
647811
protected function addProperty($name, $value)
    {
        if (count($this->filterChains) > 0) {
            $in = FileUtils::getChainedReader(new StringReader($value), $this->filterChains, $this->project);
            $value = $in->read();
        }

        $ph = PropertyHelper::getPropertyHelper($this->getProject());
        if ($this->userProperty) {
            if ($ph->getUserProperty(null, $name) === null || $this->override) {
                $ph->setInheritedProperty(null, $name, $value);
            } else {
                $this->log('Override ignored for ' . $name, Project::MSG_VERBOSE);
            }
        } else {
            if ($this->override) {
                $ph->setProperty(null, $name, $value, true);
            } else {
                $ph->setNewProperty(null, $name, $value);
            }
        }
    }
433457
protected function addClassOption($name, $value)
    {
        $value = trim($value);
        if (substr($value, 0, 1) == '.' || substr($value, 0, 1) == '#') {
            $value = substr($value, 1);
        }
        if ($value != '') {
            $this->addOption('class', $name, $value);
        }
    }
521809
public function add($name, $value)
    {
        $config = $this->option($name);
        list($key, $extra) = $this->_splitOptionName($name);

        if ($config['array']) {
            $this->_values[$key][$extra][] = $value;
        } else {
            $this->set($name, $value);
        }
        return $this->_values[$key][$extra];
    }
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);
    }