Get all elements except of a parent node

@param string $name
@return ArrayCollection
775592
public function findAllExceptTreeByParentName($name)
    {
        $parent = $this->findOneByName($name);

        return $this->findAllExceptTreeByParentId($parent->getId());
    }
419115
public function remove($name)
    {
        $removed = false;
        if ($this->has($name)) {
            $this->elements->rewind();
            while($this->elements->valid()) {
                if ($this->elements->current()->getName() == $name) {
                    $this->elements->remove();
                    $removed = true;
                    break;
                }
                $this->elements->next();
            }
        }

        return $removed;
    }
593297
public function getChild(string $name): NodeInterface
    {
        if (!isset($this->nodeChildren[$name])) {
            throw new NotFoundException($name);
        }

        return $this->nodeChildren[$name];
    }
547180
public function unsetElement($name)
    {
        if (isset($this->elements[$name])) {
            unset($this->elements[$name]);
        }

        return $this;
    }
175558
public function getNode($name)
    {
        if (!array_key_exists($name, $this->nodes)) {
            throw new LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this)));
        }

        return $this->nodes[$name];
    }
1154871
public function getChildByName($name)
	{
		if(isset($this->name2index[$name]))
			return $this->children[$this->name2index[$name]];
		return null;
	}
792927
public function findSection($name)
    {
        foreach ($this->getSections() as $section) {
            if ($section->getKey() == $name) {
                return $section;
            }
        }

        foreach ($this->getSections() as $section) {
            $found = $section->findSection($name);
            if (! is_null($found)) {
                return $found;
            }
        }

        return;
    }
500647
public function getSection($name, $default = null)
    {
        return isset($this->getSections()[$name]) ? $this->getSections()[$name] : $default;
    }
1157113
private function builderSection($name)
    {
        $builder = new TreeBuilder($name);
        /** @var ArrayNodeDefinition $node */
        $node = self::getRootNodeWithoutDeprecation($builder, $name);
        $node->beforeNormalization()
            ->ifTrue(function ($v) {
                return \is_array($v) && !empty($v);
            })
            ->then(function ($v) {
                foreach ($v as $key => &$config) {
                    if (\is_string($config)) {
                        $config = [
                            'alias' => $key,
                            'class' => $config,
                        ];
                    }
                }

                return $v;
            })
        ->end();

        $node->prototype('array')
            ->children()
                ->scalarNode('alias')->isRequired()->end()
                ->scalarNode('class')->isRequired()->end()
            ->end()
        ->end()
        ;

        return $node;
    }
847357
public function removeElement($name)
    {

        if (isset($this->elements[$name])) {
            unset($this->elements[$name]);
        }

        return $this;
    }
947268
protected function collectExtensions($name)
    {

        $extensions = [];

        foreach ($this->extensions() as $pattern) {
            if ($this->patternMatches($pattern, $name)) {
                $extensions[] = $this->getExtension($pattern);
            }
        }

        return $extensions;

    }
944876
private static function getStringElements(\DOMElement $parent, string $name) : array
    {
        $e = Utils::xpQuery($parent, './saml_metadata:'.$name);

        $ret = [];
        foreach ($e as $i) {
            $ret[] = $i->textContent;
        }

        return $ret;
    }
617021
public function get($name)
    {
        if (!array_key_exists($name, $this->items)) {
            throw new CollectionUnknownKeyException(sprintf('Item name=%s does not exist in collection',$name));
        }

        return $this->items[$name];
    }
336833
public function getCollection($name)
    {
        return array_key_exists($name, $this->collectionsByName) ? $this->collectionsByName[$name] : null;
    }
99040
public function getAll($name = null)
    {
        if (!isset($name)) {
            $headers = [];
            foreach ($this->headers as $collection) {
                $headers = array_merge($headers, $collection);
            }

            return $headers;
        }

        $lowerName = strtolower($name);
        if (!array_key_exists($lowerName, $this->headers)) {
            return [];
        }

        return $this->headers[$lowerName];
    }
272936
public function getCollection($name)
    {
        $name = strtolower($name);

        if ($this->collections->containsKey($name)) {
            return $this->collections->get($name);
        }

        $this->collections->set($name, $this->createCollection($name));

        return $this->collections->get($name);
    }
1135719
public function getChild($name)
    {
        // Special nodes
        if ('inbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Inbox($this->caldavBackend, $this->principalInfo['uri']);
        }
        if ('outbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Outbox($this->principalInfo['uri']);
        }
        if ('notifications' === $name && $this->caldavBackend instanceof Backend\NotificationSupport) {
            return new Notifications\Collection($this->caldavBackend, $this->principalInfo['uri']);
        }

        // Calendars
        foreach ($this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']) as $calendar) {
            if ($calendar['uri'] === $name) {
                if ($this->caldavBackend instanceof Backend\SharingSupport) {
                    return new SharedCalendar($this->caldavBackend, $calendar);
                } else {
                    return new Calendar($this->caldavBackend, $calendar);
                }
            }
        }

        if ($this->caldavBackend instanceof Backend\SubscriptionSupport) {
            foreach ($this->caldavBackend->getSubscriptionsForUser($this->principalInfo['uri']) as $subscription) {
                if ($subscription['uri'] === $name) {
                    return new Subscriptions\Subscription($this->caldavBackend, $subscription);
                }
            }
        }

        throw new NotFound('Node with name \''.$name.'\' could not be found');
    }