Lots of the Generator classes do this sort of thing:

    $module_root_name = $this->base_component->component_data['module_root_name'];

This is pretty much because lots of the code was converted from the old procedural code, and this was the quickest way to do that conversion.

However, it means we have a tangle of references in that every generator has to have a reference pointing to the root -- INCLUDING the root generator itself!

It looks like in most cases, the only reason generators have for getting the base is to get the data array. The exception is containingComponent(), which returns the base component.

It seems to me that a tidier way to do this would be go via the Generate Task, since all generators have a reference set to this anyway.

So we need:

- Task\Generate::getRootComponent() -- returns the root component, which the Generate Task already has.
- Generator\BaseGenerator::getRootComponentData() -- this calls getRootComponent and gets the data out of that to return it.