public function get($name)
    {
        $selected = null;
        /** @var ElementInterface|ContainerInterface $element */
        foreach ($this as $element) {
            if ($element->getName() == $name) {
                $selected = $element;
                break;
            }

            if ($element instanceof ContainerInterface) {
                $selected = $element->get($name);
                if (null !== $selected) {
                    break;
                }
            }
        }

        return $selected;
    }
public function get($name)
    {
        $selected = null;
        /** @var ElementInterface|ContainerInterface $element */
        foreach ($this as $element) {
            if ($element->getName() == $name) {
                $selected = $element;
                break;
            }

            if ($element instanceof ContainerInterface) {
                $selected = $element->get($name);
                if (null !== $selected) {
                    break;
                }
            }
        }

        return $selected;
    }
public function get ( $ name ) { $ selected = null ; /** @var ElementInterface|ContainerInterface $element */ foreach ( $ this as $ element ) { if ( $ element -> getName ( ) == $ name ) { $ selected = $ element ; break ; } if ( $ element instanceof ContainerInterface ) { $ selected = $ element -> get ( $ name ) ; if ( null !== $ selected ) { break ; } } } return $ selected ; }
Gets element by name

@param string $name

@return null|ElementInterface|InputInterface
Gets element by name