@param string $element
@param string $name

@return string
493119
public function classNamespace(string $element, string $name = ''): string
    {
        $localNamespace = trim($this->getOption($element, 'namespace', ''), '\\');
        list($namespace, $name) = $this->parseName($name);

        if (!empty($namespace)) {
            $localNamespace .= '\\' . Inflector::classify($namespace);
        }

        if (empty($this->baseNamespace())) {
            return $localNamespace;
        }

        return trim($this->baseNamespace() . '\\' . $localNamespace, '\\');
    }
534035
protected function element($element = null)
    {
        return is_null($element)
            ? $this->element
            : ($this->element = $element);
    }
97685
public function get($name)
    {
        $found = null;
        /** @var ElementInterface $element */
        foreach ($this->elements as $element) {
            if ($element->getName() == $name) {
                $found = $element;
            }
        }
        return $found;
    }
373114
protected static function getBitfield(DOMElement $element, $name)
	{
		$props    = self::getProperties($element);
		$bitfield = self::toBin($props[$name]);

		// For each bit set to 1, test whether there is an XPath condition to it and whether it is
		// fulfilled. If not, turn the bit to 0
		foreach (array_keys(array_filter(str_split($bitfield, 1))) as $bitNumber)
		{
			$conditionName = $name . $bitNumber;
			if (isset($props[$conditionName]) && !self::evaluate($props[$conditionName], $element))
			{
				$bitfield[$bitNumber] = '0';
			}
		}

		return self::toRaw($bitfield);
	}
438348
public function &getElementByName( $name )
	{
		$defaultResult = array();

		if ( ! property_exists( $this, 'elements_by_name' ) )
		{
			$this->elements_by_name = array();

			foreach ( $this->elementIndex as $elementsKey => &$element )
			{
				$this->elements_by_name[ $element['name'] ]  = &$element;
			}
		}

		if ( isset( $this->elements_by_name[ $name ] ) )
		{
			return $this->elements_by_name[ $name ];
		}
		return $defaultResult;

		return isset( $this->elements_by_name[ $name ] ) ? $this->elements_by_name[ $name ] : $defaultResult;
	}
552454
protected function resolveXRef($name)
    {
        if (($obj = $this->value[$name]) instanceof ElementXRef) {
            /** @var PDFObject $obj */
            $obj                = $this->document->getObjectById($obj->getId());
            $this->value[$name] = $obj;
        }

        return $this->value[$name];
    }
1117560
public function get($name)
    {
        if ($this->has($name)) {
            $code = $this->getCode($name);

            $this->elements[$code] = $this->resolve($this->elements[$code]);

            return $this->elements[$code];
        }

        throw new \InvalidArgumentException(sprintf('Element "%s" does not exist.', $name));
    }
1103372
protected function findElement($name)
    {
        try {
            return $this->wd->findElement(WebDriverBy::id($name));
        } catch (\Exception $e) {
        }

        try {
            return $this->wd->findElement(WebDriverBy::name($name));
        } catch (\Exception $e) {
        }

        try {
            return $this->wd->findElement(WebDriverBy::cssSelector($name));
        } catch (\Exception $e) {
        }

        try {
            return $this->wd->findElement(WebDriverBy::xpath($name));
        } catch (\Exception $e) {
        }

        throw new CannotFindElement('Cannot find element: '.$value.' isn\'t visible on the page');
    }
1071571
private function getFieldElement($element)
    {
        $element = $this->getElement($element);
        while (null !== $element && !$element->hasClass('field')) {
            $element = $element->getParent();
        }

        return $element;
    }
1320875
static public function changeElementName(DOMElement $element, $name)
    {
        $newElement = $element->ownerDocument->createElement($name);

        foreach ($element->childNodes as $child) {
            $child = $element->ownerDocument->importNode($child, true);
            $newElement->appendChild($child);
        }

        foreach ($element->attributes as $attrName => $attrNode) {
            if ($attrNode->namespaceURI === null) {
                $newElement->setAttribute($attrName, $attrNode->value);
            } else {
                $newElement->setAttributeNS($attrNode->namespaceURI, $attrNode->prefix . ':' . $attrName, $attrNode->value);
            }

        }

        $newElement->ownerDocument->replaceChild($newElement, $element);

        return $newElement;
    }
759184
public function getElement( $name, $prefix = null )
	{
		return $this->hasElement( $name, $prefix )
			? $this->elements[ is_null( $prefix ) ? $name : "$prefix:$name" ]
			: false;
	}
120366
public function resolveElement(Element $element)
    {
        $elementtype = $this->elementService->findElementtype($element);

        return $this->resolveElementtype($elementtype);
    }
1071123
public function addElement($element, $name = null, $options = null) {
        if (is_string($element)) {
            $index = isset($options['index']) ? $options['index'] : 0;
            unset($options['index']);
        } elseif ($element instanceof Zend_Form_Element) {
            $index = $element->getAttrib('index') ?: 0;
            $element->setAttrib('index', null);
        } else {
            throw new Garp_Form_Exception('Unable to resolve given element. $element must be string or Zend_Form_Element.');
        }

        if (!$subform = $this->getSubForm($index)) {
            $subform = $this->_createSubFormAtIndex($index);
            $this->addSubForm($subform);
        }
        $subform->addElement($element, $name, $options);
    }
523734
protected function element(string $name): \DOMElement
    {
        if (\strpos($name, ':') !== false)
        {
            $keys = explode(':', $name);

            return $this->document()->createElementNS(
                $this->namespaces[$this->options()->getNamespace() . ':' . \current($keys)],
                $name
            );
        }

        return $this->createElement($name);
    }
786716
protected function createElement($name)
    {
        if (isset($this->elements[$name])) {
            return $this->factory->createInlineElement($this->elements[$name]);
        }

        return $this->factory->createElement($name);
    }
424913
protected function renderElement($block, $element, $name)
    {
        return $this->mustache->render($block, array(
            'element'   => $element,
            'name'      => $name,
            'type'      => $this->getInputType($name),
            'label'     => str_replace('_', ' ', ucwords($name)) . ':'
        ));
    }
1249492
public static function element($name) {
        if (isset(static::$html5[$name])) {
            return static::$html5[$name];
        }
        if (isset(static::$svg[$name])) {
            return static::$svg[$name];
        }
        if (isset(static::$mathml[$name])) {
            return static::$mathml[$name];
        }

        return false;
    }