adds given element and key to result structure

@param  mixed  $element
@param  mixed  $key
346379
public function accumulate($element, $key)
    {
        $accumulate = $this->accumulator;
        $accumulate($this->structure, $element, $key);
    }
231434
public function deleteElement(ListElement $element)
    {
        if (!$this->hasElement($element->getUuid())) {
            throw new ListElementKeyDoesNotExistException('Invalid key '.$element->getUuid()->getUuid());
        }

        unset($this->elements[$element->getUuid()->getUuid()]);
    }
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;
        }
    }
1086785
protected function addAttributes(DOMElement $element, $storage): void
    {
        foreach ($storage as $attrKey => $attrVal) {
            if (strpos($attrKey, ':') !== false) {
                $this->namespaces[$attrKey] = $attrVal;
            }

            $element->setAttribute($attrKey, $attrVal);
        }
    }
739153
public function addElement($element) {
		if ($element instanceof HtmlButtongroups) {
			$this->elements []=$element;
		} else {
			$this->getLastButtonGroup()->addElement($element);
		}
	}
772213
public function getElement ($key, $elementType)
    {
        $elements = $this->getAllElements($elementType);

        return array_key_exists($key, $elements)
            ? $elements[$key]
            : null;
    }
591387
private function _validate_element($element, $position)
	{
		$key = reset($element);
		$allowed_keys = array(self::CONTEXT, self::LANG, self::PARAMETER, self::STRING);
		if ( ! in_array($key, $allowed_keys))
		{
			throw new \InvalidArgumentException('Translation definition "'.$key.'" expected to be one of "'.implode('", "', $allowed_keys).'", "'.$key.'" found.');
		}
		$elements_count = count($element);
		if ($key !== self::PARAMETER && $elements_count !== 2)
		{
			throw new \InvalidArgumentException('Translation definition "'.$key.'" expected to have 2 elements, '.$elements_count.' found.');
		}
		elseif ($key === self::PARAMETER && ($elements_count < 2 || $elements_count > 3))
		{
			throw new \InvalidArgumentException('Translation definition "'.$key.'" at position '.($position + 1).' expected to have 2 or 3 elements, '.$elements_count.' found.');
		}
	}
70315
public function put($key, $data)
    {
        $filename = $this->getKeyCode($key);
        $data = json_encode($data);
        $this->write($data, $filename);
    }
175774
public function addElementToContentSet($element, $type)
    {
        if (!isset($this->content_sets[$type])) {
            $this->content_sets[$type] = '';
        } else {
            $this->content_sets[$type] .= ' | ';
        }
        $this->content_sets[$type] .= $element;
    }
251091
protected function addPageHeader(Element $element) {
        $this->addH1(self::escape($element->getName()))->addLine();
        if (self::getNamespace($element) !== '') {
            $this->beginPhpDomain('namespace', substr(self::getNamespace($element), 1), false);
        }
        if ($element instanceof Class_) {
            $modifiers = $element->isAbstract() ? ' abstract' : '';
            $modifiers = $element->isFinal() ? ' final' : $modifiers;
            if ($modifiers !== '') {
                $this->addLine('.. rst-class:: ' . $modifiers)->addLine();
            }
        }

        $this->callExtensions(self::SECTION_AFTER_TITLE, $element);


        $this->beginPhpDomain($this->getTypeForClass($element), $element->getName(), false);
        $this->addLine();
    }
1079470
public function containsKey($key)
    {
        if ($key instanceof UniqueId) {
            $key = $key->id();
        }

        return $this->elements->containsKey($key);
    }
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;
    }
893959
public function add($element, $postion=null, $type=null) {
		parent::add($element, $postion, $type);
	}
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' ] );
	}
1247042
protected function addNode(DOMElement $element, $key, $value)
    {
        if ($this->replaceSpacesByUnderScoresInKeyNames) {
            $key = str_replace(' ', '_', $key);
        }

        $child = $this->document->createElement($key);
        $element->appendChild($child);
        $this->convertElement($child, $value);
    }
424142
function addEnumeration( $element )
    {
        $enumvalue = eZEnumValue::create( $this->ClassAttributeID, $this->ClassAttributeVersion, $element );
        $enumvalue->store();
        $this->Enumerations = eZEnumValue::fetchAllElements( $this->ClassAttributeID, $this->ClassAttributeVersion );
    }
479741
public void put(long key, T element) {
		Entry<T> entry = new Entry<T>(key, element);
		elements.add(entry);
		this.numElements++;
		fileElement(entry, true);
	}