src/Index/Index.php
public function getChildDefinitionsForFqn(string $fqn): \Generator
    {
        $parts = $this->splitFqn($fqn);
        if ('' === end($parts)) {
            // we want to return all the definitions in the given FQN, not only
            // the one (non member) matching exactly the FQN.
            array_pop($parts);
        }

        $result = $this->getIndexValue($parts, $this->definitions);
        if (!$result) {
            return;
        }
        foreach ($result as $name => $item) {
            // Don't yield the parent
            if ($name === '') {
                continue;
            }
            if ($item instanceof Definition) {
                yield $fqn.$name => $item;
            } elseif (is_array($item) && isset($item[''])) {
                yield $fqn.$name => $item[''];
            }
        }
    }
public function getChildDefinitionsForFqn(string $fqn): \Generator
    {
        $parts = $this->splitFqn($fqn);
        if ('' === end($parts)) {
            // we want to return all the definitions in the given FQN, not only
            // the one (non member) matching exactly the FQN.
            array_pop($parts);
        }

        $result = $this->getIndexValue($parts, $this->definitions);
        if (!$result) {
            return;
        }
        foreach ($result as $name => $item) {
            // Don't yield the parent
            if ($name === '') {
                continue;
            }
            if ($item instanceof Definition) {
                yield $fqn.$name => $item;
            } elseif (is_array($item) && isset($item[''])) {
                yield $fqn.$name => $item[''];
            }
        }
    }
public function getChildDefinitionsForFqn ( string $ fqn ) : \ Generator { $ parts = $ this -> splitFqn ( $ fqn ) ; if ( '' === end ( $ parts ) ) { // we want to return all the definitions in the given FQN, not only // the one (non member) matching exactly the FQN. array_pop ( $ parts ) ; } $ result = $ this -> getIndexValue ( $ parts , $ this -> definitions ) ; if ( ! $ result ) { return ; } foreach ( $ result as $ name => $ item ) { // Don't yield the parent if ( $ name === '' ) { continue ; } if ( $ item instanceof Definition ) { yield $ fqn . $ name => $ item ; } elseif ( is_array ( $ item ) && isset ( $ item [ '' ] ) ) { yield $ fqn . $ name => $ item [ '' ] ; } } }
Returns a Generator that yields all the direct child Definitions of a given FQN

@param string $fqn
@return \Generator yields Definition
Returns a Generator that yields all the direct child Definitions of a given FQN