Add an xsd:element represented as an array to the schema.

@param array $element An xsd:element represented as an array.
@return string
2648
public function addElement(array $element)
    {
        $elementXml = $this->parseElement($element);
        $this->schema->appendChild($elementXml);
        return 'tns:' . $element['name'];
    }
303688
public function addElement(AbstractElement $element)
    {
        $name = $element->getName();
        if (in_array($name, $this->uniqueList)) {
            $this->elements[$name] = $element;
        } else {
            $this->elements[] = $element;
        }

        return $this;
    }
308752
private function wrap($element) {
        $this->stack[] = $this->data;
        foreach ($element as $k => $v) {
            $this->data[$k] = $v;
        }
    }
199163
public function addElement($element, $name = null, $attrs = null) {
		switch (true) {
			case is_array($element):
				$newElement = new static($element);
				break;

			case $element instanceof self:
			case $element instanceof ListElement:
				$newElement = $element;
				break;

			default:
				$newElement = new ListElement($element, $attrs);
		}
		
		return parent::addElement($newElement, $name);
	}
1047663
protected function formatKeywordElement(KeywordElement $element)
    {
        $name = $element->getName();
        $keyword = $this->getOption(['keywords', $name]);
        $result = call_user_func($keyword, $element->getValue(), $element, $name);

        if (is_string($result)) {
            $result = ['begin' => $result];
        }

        if (!is_array($result) && !($result instanceof \ArrayAccess)) {
            $this->throwException(
                "The keyword $name returned an invalid value type, string or array was expected.",
                $element
            );
        }

        foreach (['begin', 'end'] as $key) {
            $result[$key] = (isset($result[$key.'Php'])
                ? "<?php\n".$result[$key.'Php']."\n?>"
                : ''
            ).(isset($result[$key])
                ? $result[$key]
                : ''
            );
        }

        return implode('', array_filter([
            $result['begin'],
            $this->formatElementChildren($element),
            $result['end'],
        ]));
    }
1157567
protected static function create(array $element)
    {
        $class = self::getClassName($element['type']);
        $object = new $class;
        if ($object instanceof ContainerInterface) {
            static::execute($object, $element);
        }
        return $object;
    }
888495
public function add($elements)
    {
        if (is_array($elements)) {
            foreach ($elements as $element) {
                $this->add($element);
            }
        } else {
            $this->collections->add($elements);
        }

        return $this;
    }
272592
protected function addElement($element)
    {
        if($element->getData() == null) {
            throw new Exception("Invalid Element data: null is not allowed.");
        }
        if ($this->elementExistsWith($element->getData())) {
            $this->addWeightToExisting($element);
        } else {
            $this->elements[] = $element;
        }

        return $this;
    }
437721
public function addElement(Element $element)
    {
        if (!in_array($element, $this->elements, true)) {
            array_push($this->elements, $element);
        }
        return $this;
    }
671605
public function addElement($attrs)
    {
        if (!$this->getPrefix($attrs['type'])) {
            $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
        }
        $this->elements[$attrs['name']] = $attrs;
        $this->elements[$attrs['name']]['typeClass'] = 'element';

        $this->xdebug("addElement " . $attrs['name']);
        $this->appendDebug($this->varDump($this->elements[$attrs['name']]));
    }
1074751
private function hashArray( $elements )
	{
		$hashes = array();

		if ( is_array( $elements ) )
		{
			foreach ( $elements as $key => $element )
			{
				if ( is_object( $element ) )
				{
					$hash = spl_object_hash( $element ) . $key;
					$hashes[ $hash ] = $element;
				}
				else if ( is_array( $element ) )
				{
					extract( $this->hashArray( $element ) ) . $key;
					$hashes[ $hash ] = $element;
				}
				else
				{
					$hash = hash( 'sha256', $element . $key );
					$hashes[ $hash ] = $element;
				}
			}
		}
		else
		{
			$hash = hash( 'sha256', $elements );
			$hashes[ $hash ] = $elements;
		}

		return array( 'hash' => hash( 'sha256', serialize( array_keys( $hashes ) ) ), 'element_hashes' => $hashes );
	}
438472
private function replaceInsertTag(array $elements): string
    {
        if (3 !== \count($elements)) {
            return '';
        }

        list($source, $value, $property) = $elements;

        $tag = $this->registry->get($source)->find($value);

        if (null === $tag) {
            return '';
        }

        if ('name' === $property) {
            return $tag->getName();
        }

        $data = $tag->getData();

        return isset($data[$property]) ? (string) $data[$property] : '';
    }
167157
public function pushScalar(array $element) {
        if(!empty($element['required'])) {
            $this->hasRequired = true;
        }
        if(empty($this->containers)) {
            $this->array += $element;
        } else {
            $this->containers[count($this->containers) - 1][\Illuminate\Support\Arr::get($element, 'id')] = $element;
        }
    }
1022296
public function addCustomElement($element)
    {
        if (($colon = strpos($element, ':')) !== false) {
            $namespace = substr($element, 0, $colon);
            if (!$this->hasNamespace($namespace)) {
                throw new \InvalidArgumentException(sprintf('Unregistered namespace: %s', $namespace));
            }
        }

        $this->customElements[] = $element;

        return $this;
    }
1071571
private function getFieldElement($element)
    {
        $element = $this->getElement($element);
        while (null !== $element && !$element->hasClass('field')) {
            $element = $element->getParent();
        }

        return $element;
    }
945874
public function add($element) {
        if ((is_object($element) && !is_a($element, 'DScribe\Form\Element')) ||
                (!is_object($element) && !is_array($element)))
            throw new Exception('Form elements must be either an array or an object subclass of DScribe\Form\Element');
        else if (is_array($element)) {
            if (!isset($element['type'])) {
                throw new \Exception('Form elements must of key type');
            }
            $elementClass = 'DScribe\Form\Element\\' . ucfirst($element['type']);
            $element = class_exists($elementClass) ? new $elementClass($element, true, 'values') : new Element($element, true, 'values');
        }
        if ($this->data[$element->name]) {
            $element->data = $this->data[$element->name];
            unset($this->data[$element->name]);
        }

        if (in_array($element->type, array('checkbox', 'radio'))) {
            $this->booleans[$element->name] = $element->name;
        } else if ($element->type === 'fieldset') {
            $this->fieldsets[] = $element->name;
        } else if ($element->type === 'hidden' && $element->name === 'csrf')
            $element->setCsrfKey($this->getName());

        $this->elements[$element->name] = $element;

        if (!$element->filters) {
            $filters = $this->getFilters();
            if ($filters[$element->name])
                $element->filters = $filters[$element->name];
        }

        return $this;
    }
1127120
public function addBlankElement($element)
    {
        if (!isset($this->info[$element])) {
            $this->elements[] = $element;
            $this->info[$element] = new HTMLPurifier_ElementDef();
            $this->info[$element]->standalone = false;
        } else {
            trigger_error("Definition for $element already exists in module, cannot redefine");
        }
        return $this->info[$element];
    }