在队列尾部增加元素

@param string $name
@param mixed $element
@return boolean
762692
public function push($name, ...$element)
    {
        $result = true;
        foreach($element as $e)
        {
            $result &= $this->getInstance($name)->enqueue($e);
        }
        return $result;
    }
423762
public function getElementsByName($name) {

		if(isset($this->elements[$name])) {
			return $this->elements[$name];
		}
		
		throw new \InvalidArgumentException(sprintf("Unknown form element '%s'", $name));

	}
99564
private function addElement($name, $parent = false, $ns = false)
    {
        if ($ns) {
            $el = $parent->ownerDocument->createElementNS($ns, $name);
        } else {
            $el = $parent->ownerDocument->createElement($name);
        }
        if ($parent) {
            $parent->appendChild($el);
        }

        return $el;
    }
534035
protected function element($element = null)
    {
        return is_null($element)
            ? $this->element
            : ($this->element = $element);
    }
865734
public function removeElement($element)
    {
        $key = array_search($element, $this->getArrayCopy());
        
        if (false !== $key)
        {
            $this->remove($key);
        }
    }
1277179
public function setElement($name, $element, $position = null)
    {
        $name = trim($name);
        if ($name === '') {
            throw new InvalidArgumentException('Empty child name');
        } elseif (is_array($element)) {
            $config = $element;
            $config['parent'] = $this;
            $config['name'] = $name;
            $element = $this->createElement($config);
        } elseif (true === ($element instanceof \marvin255\serviform\interfaces\Field)) {
            $element->setName($name);
            $element->setParent($this);
        } else {
            throw new InvalidArgumentException('Wrong child type for field: ' . $name);
        }
        if ($position === null) {
            $this->elements[$name] = $element;
        } else {
            $elements = [];
            $itemPosition = $position < 0 ? count($this->elements) + $position : $position;
            $i = 0;
            foreach ($this->elements as $iKey => $iElement) {
                if ($i === $itemPosition) {
                    $elements[$name] = $element;
                }
                $elements[$iKey] = $iElement;
                ++$i;
            }
            $this->elements = $elements;
        }

        return $this;
    }
739153
public function addElement($element) {
		if ($element instanceof HtmlButtongroups) {
			$this->elements []=$element;
		} else {
			$this->getLastButtonGroup()->addElement($element);
		}
	}
358866
public function add( $element ) {
		if ( $this->type->is_model() && is_array( $element ) ) {
			$element = $this->type->create_model( $element );
		}

		$this->type->validate_element( $element );

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

		$collection = new static( $this->get_type() );
		$collection->set_from_trusted( $elements );

		return $collection;
	}
1351267
public function addElement($element, $title = null, $name = null, $attrs = null) {
		if (! $element instanceof Element &&
			! $element instanceof Divider) {
			
			if ($element === self::DIVIDER) {
				$element = new Divider(null, $attrs);
			} else {
				if ($title === null) {
					$title = $element;
				}
				
				$element = new Element($element, $title, $attrs);
			}
		}
		
		if ($name === null && $title !== null) {
			$name = $title;
		}
		
		return parent::addElement($element, $name);
	}
759184
public function getElement( $name, $prefix = null )
	{
		return $this->hasElement( $name, $prefix )
			? $this->elements[ is_null( $prefix ) ? $name : "$prefix:$name" ]
			: false;
	}
547180
public function unsetElement($name)
    {
        if (isset($this->elements[$name])) {
            unset($this->elements[$name]);
        }

        return $this;
    }
1119388
public boolean add(Object element) {

        last.next = new Node(element, null);
        last      = last.next;

        elementCount++;

        return true;
    }
1192249
public function hasElement( $name, $prefix = null )
	{
		return isset( $this->elements[ is_null( $prefix ) ? $name : "$prefix:$name" ] );
	}
1090158
public function findTypeElement($name)
    {
        $type = null;

        $elements = $this->xpath('//s:simpleType[@name=%s]|//s:complexType[@name=%s]', $name, $name);
        if ($elements->length > 0) {
            $type = $elements->item(0);
        }

        if (empty($type)) {
            foreach ($this->referereces as $import) {
                $type = $import->findTypeElement($name);
                if (!empty($type)) {
                    break;
                }
            }
        }

        return $type;
    }
415899
public function className(string $element, string $name): string
    {
        list($namespace, $name) = $this->parseName($name);

        return Inflector::classify($name) . $this->elementPostfix($element);
    }
2648
public function addElement(array $element)
    {
        $elementXml = $this->parseElement($element);
        $this->schema->appendChild($elementXml);
        return 'tns:' . $element['name'];
    }
250825
public boolean defineElement(String name, Node definingNode) {
    elements.add(name);
    return defineDeclaredProperty(name, elementsType, definingNode);
  }