This follows up the work in T186823 and builds on the recommendations in T186823#6409592.
# Desired Outcomes
[] The variables MobileFormatter::$title, MobileFormatter::$topHeadingTags are no longer needed due to transformers being created inside the constructor (or passed into the constructor)
[] The RemoveImagesTransform is limited to the MobileViewAPI. It is not used inside normal page views.
[X] We iterate over an array of transformers rather than calling
[X] The transform behaviour has been moved outside of MobileFormatter::filterContent. That method should match the function signature and behaviour of HtmlFormatter::filterContent
[X] {T261291}
[X] Generalize MobileFormatter to accept all valuable parameters in constructor and remove all arguments from MobileFormatter::applyTransforms T261291#6431231
[] The MakeSectionsTransform should be generalized to take a list of transforms rather than to manually construct the LazyImageTransform and MoveLeadParagraphTransform. One way would be to pass in arrays of transforms for lead and rest [[ https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/622865/6/includes/Transforms/MakeSectionsTransform.php#b76 | (as explored in this patch ]]) another way would be to update MoveLeadParagraphTransform and LazyImageTransform to work with the DOMelement representing the article rather than the individual sections