Appends element parts to the internal list.
@param string|array $elements
@param mixed        $extra
@return void

@SuppressWarnings(PHPMD.UnusedFormalParameter)
160951
public function append($elements, $extra = null)
    {
        $this->_conditions = array_merge($this->_conditions, (array)$elements);
    }
935664
public function add(...$elements) : self
    {
        foreach ($elements as $element) {
            $this->elements[] = $element;
        }

        return $this;
    }
948665
public function addElement($element)
    {
        if ($this->processing === 'B') {
            $this->pdf->addBody($element);

            return;
        }

        if ($this->processing === 'H') {
            $this->pdf->addHeader($element);

            return;
        }

        if ($this->processing === 'F') {
            $this->pdf->addFooter($element);

            return;
        }
    }
73352
public function addElementArray($elementArray)
    {
        if (!is_array($elementArray))
        {
            return;
        }
        foreach ($elementArray as $elementName => $content)
        {
            $this->addElement($elementName, $content);
        }
    }
672682
public function append($elements, $extra = null)
    {
        $elements = (array)$elements;
        reset($elements);
        if ($header = current($elements)) {
            $this->_columns = array_keys($header);
        }

        if ($maxLength = count($this->_columns)) {
            $index = 0;
            foreach ($elements as $data) {
                $data      = array_values((array)$data);
                $dataCount = count($data);

                if ($dataCount < $maxLength) {
                    $data = $data + array_fill($dataCount, $maxLength - $dataCount, null);

                } elseif ($dataCount > $maxLength) {
                    $data = array_slice($data, 0, $maxLength);
                }

                $this->_conditions[$index++] = $data;
            }
        }
    }
1199655
protected function writeElement($element): void
    {
        if (!is_array($element)) {
            $type = (is_object($element) ? get_class($element) . ' ' : '') . gettype($element);
            trigger_error("Unable to write to element to CSV stream; expect array, $type given", E_USER_WARNING);

            fwrite($this->stream, "\n");
            return;
        }

        fputcsv($this->stream, $element, $this->delimiter, $this->enclosure, $this->escapeChar);
    }
125861
public function addElements(array $elements): self
    {
        foreach ($elements as $element) {
            if ($element instanceof OpenGraphElement) {
                $this->elements[] = $element->toArray();
            }
        }

        return $this;
    }
641489
protected function filterElements(array &$elements): void
    {
        if (!empty($elements['storage_key'])) {
            $this->_storage['storage_key'] = trim($elements['storage_key']);
        }
        if (!empty($elements['storage_timestamp'])) {
            $this->_storage['storage_timestamp'] = (int)$elements['storage_timestamp'];
        }

        unset ($elements['storage_key'], $elements['storage_timestamp'], $elements['_post_entries_save']);
    }
981192
public void add(@Nonnull JsonBuilder...elements) {
        for (JsonBuilder element : elements) {
            add(element.get());
        }
    }
717501
public function appendChildNode(\SimpleXMLElement $element)
    {
        $target  = dom_import_simplexml($this);
        $insert = $target->ownerDocument->importNode(dom_import_simplexml($element), true);
        $target->appendChild($insert);
    }
860646
public function appendToLastLine(string $part): void
  {
    $this->lines[count($this->lines) - 1] .= $part;
  }
893945
public function setExtras(array $extra)
    {
        if (!empty($extra)) {
            $this->extras = array_merge($this->extras, $extra);
        }

        return $this;
    }
1216997
public static function add( $element, $location = [] ) {
		if ( ! isset( self::$_elements[ $element ] ) ) {
			self::$_elements[ $element ] = [];
		}

		if ( empty( $location ) ) {
			$default_location = self::get_default_location( $element );

			if ( $default_location ) {
				self::$_elements[ $element ][] = [ $default_location ];
			} else {
				throw new \Exception( 'Element ' . $element . ' does not have a default location. You must supply the $location parameter.' );
			}
		} else {
			self::$_elements[ $element ][] = [ $location ];
		}

		add_action( 'init', [ __CLASS__, 'register_elements' ] );
	}
423794
public function addElementArray(array $elements) {

		if(count($elements)) {
			
			$firstElement = array_shift($elements);
			$name = $firstElement->getName();

			// remove any array indexes from name

			$name = preg_replace('~\[\w*\]$~i', '', $name);

			if(!empty($this->elements[$name])) {

				throw new HtmlFormException(sprintf("Element '%s' already assigned.", $name));

			}

			$arrayName = $name . '[]';
			$firstElement
				->setName($arrayName)
				->setForm($this)
			;

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

			foreach($elements as $e) {
				
				if(get_class($e) !== get_class($firstElement)) {

					throw new HtmlFormException(sprintf("Class mismatch of form elements array. Expected '%s', found '%s'.", get_class($firstElement), get_class($e)));

				}
				
				// check whether names of element arrays match

				$nameToCheck = preg_replace('~\[\w*\]$~i', '', $e->getName());

				if($nameToCheck && $nameToCheck !== $name) {
					
					throw new HtmlFormException(sprintf("Name mismatch of form elements array. Expected '%s' or empty name, found '%s'.", $name, $e->getName()));

				}

				$e
					->setName($arrayName)
					->setForm($this)
				;

				$this->elements[$name][] = $e;
			}

		}

		return $this;

	}
124127
public function appendXML(SimpleXMLElement $append)
    {
        if (strlen(trim((string) $append)) == 0) {
            $xml = $this->addChild($append->getName());
            foreach ($append->children() as $child) {
                $xml->appendXML($child);
            }
        } else {
            $xml = $this->addChild($append->getName(), (string) $append);
        }
        foreach ($append->attributes() as $n => $v) {
            $xml->addAttribute($n, $v);
        }
    }
91847
public function addElement(\Controller\OWeb\Helpers\Form\Elements\AbstractElement $element){
		$this->_elements[] = $element;
		//$element->init();
	}
424968
public function addByElement($element, array $styles)
    {
        $this->elements[$element] = array_merge_recursive($this->getByElement($element), $styles);
    }