public function getComponentByNameRecursive($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() === $name) {
                return $component;
            }
            if ($component instanceof TRegistry || $component instanceof RegistryInterface) {
                if ($res = $component->getComponentByNameRecursive($name)) {
                    return $res;
                }
            }

        }
        return null;
    }
public function getComponentByNameRecursive($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() === $name) {
                return $component;
            }
            if ($component instanceof TRegistry || $component instanceof RegistryInterface) {
                if ($res = $component->getComponentByNameRecursive($name)) {
                    return $res;
                }
            }

        }
        return null;
    }
public function getComponentByNameRecursive ( $ name ) { foreach ( $ this -> getComponents ( ) as $ component ) { if ( $ component -> getName ( ) === $ name ) { return $ component ; } if ( $ component instanceof TRegistry || $ component instanceof RegistryInterface ) { if ( $ res = $ component -> getComponentByNameRecursive ( $ name ) ) { return $ res ; } } } return null ; }
Finds child component by name recursively.

@param string $name
@return null|ComponentInterface
Finds child component by name recursively .