Yes ... I am not entirely sure if the first approach will work since there are more than a few lines of code to figure the View Template out, and those lines of code include some "business logic" as well.
For example part of $input is a boolean $isMotorPresent, and other engineering type values. Part of generated $output is "How many supporting stands does this product have" which take some hefty computation to figure out. "presence of motor" is not part of $output, although I suppose it could be.... That's kind of a judgement call. Both pieces (from $input & $output) are needed to pick the right View template.
So a problem remains.. My particular View and the way my code is currently set up, my "View Factory" or my "Code that's close to the controller", needs to know $input as well.
So, for example I would have to do this:
$this->view = ClassThatCreatesViewsFromOutputData::factory($input, $output);
Or I would have to copy certain values from $input to $output so I can do this:
//whether $output is bloated I guess is relative, I can say it's not..
//But the bloated part (one copied over as pass-through from $input) will only used to compute the View template
//and will not be used otherwise.
$this->view = ClassThatCreatesViewsFromOutputData::factory($bloated_Output_That_Contains_A_Bit_Of_Input);
And that was my problem .... i.e. I can either
1. put up with using both $input and $output in my code in my View Factory (or make the $output contain $input)
2. compute part of View (the template part) inside my ClassThatComputesData, probably breaking SRP, because ClassThatComputesData already contains $input and the view-template-required $output is being created as part of ClassThatComputesData
3. make View-template accept $input only and recompute the needed $output vars
All of the above will work but I think is somehow breaking SRP or at least creating some bloat/rework........ #2 is how my legacy code was, and my current code is a little weird because I essentially do array merge .... which I see as a hack
$this->view = ClassThatCreatesViewsFromOutputData::factory(array_merge($input, $output));