Returns a new Includes object containing all keys spliced below the given parent key,
as well as any mapped params.

@param string $parentKey

@return static

@see Includes::descendantsOf()
@see Includes::allParamsFor()
763465
public function splice($parentKey)
    {
        // Get all the descendant keys
        $keys = $this->descendantsOf($parentKey);

        // Cool, we have a list of keys, now let's get the associated params
        $params = $this->allParamsFor($keys); // That was hard

        return new static(
            $keys,
            $params
        );
    }
589935
public function getSiblingNode($key)
    {
        return isset($this->siblingNode[$key][$this->currentDepth]) ? $this->siblingNode[$key][$this->currentDepth] : false;
    }
18671
public function getCategoriesFunction($locale, $parentKey = null)
    {
        return $this->memoizeCache->memoizeById(
            'sulu_categories',
            func_get_args(),
            function($locale, $parentKey = null) {
                $entities = $this->categoryManager->findChildrenByParentKey($parentKey);
                $categories = $this->categoryManager->getApiObjects($entities, $locale);
                $context = SerializationContext::create();
                $context->setSerializeNull(true);

                return $this->serializer->serialize($categories, 'array', $context);
            }
        );
    }
1116450
public function getSection(string $key) : ConfigurationBagInterface
    {
        return new ConfigurationBag(isset($this->parameters[$key]) ? $this->parameters[$key] : []);
    }
773192
public function resolve( $rootKey, $key = null )
	{
		if ( !$key )
		{
			if ( !is_null( $this->def ) )
				return $this->get( $this->def );

			throw new BindingException( "The default key was never set for Service Resolver [" . static::class . "]" );
		}

		if ( !is_string( $key ) )
			throw new ResolverException( "Key must be a string" );

		if ( $result = $this->get( $key ) )
			return $result;

		throw new ResolverException( "Failed to resolve [" . $rootKey . ( empty( $key ) ? "" : "." . $key ) . "]" );
	}
1316261
public function get($key)
    {
        if (mb_strpos($key, $this->delimiter) !== false) {
            return $this->getChild($key);
        }

        return parent::get($key);
    }
211067
public function getParentKey()
    {
        if ($this->owner->isRoot()) {
            return null;
        }
        $path = $this->getPath();
        return array_pop($path);
    }
824543
public function parseKey($key)
    {
        // If we've already parsed the given key, we'll return the cached version we
        // already have, as this will save us some processing. We cache off every
        // key we parse so we can quickly return it on all subsequent requests.
        if (isset($this->parsed[$key])) {
            return $this->parsed[$key];
        }

        // If the key does not contain a double colon, it means the key is not in a
        // namespace, and is just a regular configuration item. Namespaces are a
        // tool for organizing configuration items for things such as modules.
        if (strpos($key, '::') === false) {
            $segments = explode('.', $key);

            $parsed = $this->parseBasicSegments($segments);
        } else {
            $parsed = $this->parseNamespacedSegments($key);
        }

        // Once we have the parsed array of this key's elements, such as its groups
        // and namespace, we will cache each array inside a simple list that has
        // the key and the parsed array for quick look-ups for later requests.
        return $this->parsed[$key] = $parsed;
    }
473552
public function hasMany($related, $parentKey = null, $localKey = null)
    {
        $parentKey = $parentKey ?: $this->getParentKey();
        $localKey = $localKey ?: $this->getKeyName();

        $instance = new $related;

        return new Relations\Relation($instance, $this, $parentKey, $localKey);
    }
1346567
private function getAllChildKeys($data, $maps, $parent_keys, $parent_types, & $result, & $keys, $current_key = [], $current_type = null) {
		if ($current_type == '11') {
			$data = ['__11__' => $data];
		}
		foreach ($data as $k => $v) {
			$new_key = $current_key;
			if ($current_type != '11') {
				$new_key[] = $k;
			}
			if (count($parent_keys) == 1) {
				$new_key[] = $parent_keys[0];
				// put values into result
				$result[] = $new_key;
				// generate keys
				$temp = [];
				foreach ($maps[0] as $k3 => $v3) {
					$temp[] = $v[$k3];
				}
				// we need to preserve a data type if its just one column key
				if (count($temp) == 1) {
					$keys[] = $temp[0];
				} else {
					$keys[] = implode('::', $temp);
				}
			} else {
				// remove extra level
				$parent_keys_temp = $parent_keys;
				$v2 = array_shift($parent_keys_temp);
				$parent_types_temp = $parent_types;
				array_shift($parent_types_temp);
				$maps_temp = $maps;
				array_shift($maps_temp);
				// generate key
				$new_key[] = $v2;
				$this->getAllChildKeys($v[$v2], $maps_temp, $parent_keys_temp, $parent_types_temp, $result, $keys, $new_key, $parent_types[0]);
			}
		}
	}
1193899
static function fromKey(string $key)
    {
        return self::$instanceCache[static::class][$key]
            ?? (self::$instanceCache[static::class][$key] = new static($key, static::getValue($key)));
    }
1277330
public function getChildKeyList($key = null)
    {
        $child = $this->get($key);
        $list  = [];
        $n     = 0;
        foreach ($child as $k => $v) {
            $list[$n++] = $k;
        }
        return $list;
    }
665154
public function alterQueryBuilderWithParentRoot($query, $parent_id, $include_parent = true)
    {
        if (is_null($parent_id)) {
            return $query;
        }
        $parent = $this->find($parent_id);

        $query->andWhere(
            $query->getRootAliases()[0] . '.lft >=' . $this->addNamedParameter('lft', $parent->getLft(), $query)
            . ' AND ' .
            $query->getRootAliases()[0] . '.lft <=' . $this->addNamedParameter('rgt', $parent->getRgt(), $query)
        );
        if (!$include_parent) {
            $query->andWhere(
                $query->getRootAliases()[0] . '.id !=' . $this->addNamedParameter('id', $parent_id, $query)
            );
        }
        return $query;
    }
717547
public function isLast($key)
    {
        if (null === $this->lastKey) {
            end($this->hierarchy);
            $this->lastKey = key($this->hierarchy);
        }

        return $key === $this->lastKey;
    }
877313
public function hasOne($related, $parentKey = null, $localKey = null)
    {
        $parentKey = $parentKey ?: $this->getParentKey();
        $localKey = $localKey ?: $this->getKeyName();

        $instance = new $related;

        $relation = new Relations\Relation($instance, $this, $parentKey, $localKey);

        return $relation->find($localKey);
    }
1012563
public function loadInlineFields($parentKey)
    {
        $json = $this->load();
        $inlineFields = array();
        foreach ($json as $table) {
            if ($table["tca"]) {
                foreach ($table["tca"] as $key => $tca) {
                    if ($tca["inlineParent"] == $parentKey) {
                        if ($tca["config"]["type"] == "inline") {
                            $tca["inlineFields"] = $this->loadInlineFields($key);
                        }
                        $tca["maskKey"] = "tx_mask_" . $tca["key"];
                        $inlineFields[] = $tca;
                    }
                }
            }
        }
        return $inlineFields;
    }
1121084
public function property(array $props, string $key): array
    {
        $self = $this;
        $prop = &$props[$key];

        if (empty($this->props[$key]))
        {
            if (isset($prop['extends']))
            {
                $extends = Arr::map((array)$prop['extends'], function ($extend) use ($self, &$props) {
                    return $self->property($props, $extend);
                });

                $prop = \array_merge_recursive(
                    $prop,
                    ...$extends
                );
            }

            $this->props[$key] = $prop;
        }

        return $this->props[$key];
    }