Menu

#247 [Patch] Update HtmlSerializer to make it subclass-friendly

Latest SVN
closed
RBRi
None
1
2017-12-02
2017-07-30
Rob Kodey
No

I'm suggesting updating some of the method access modifiers to allow for easier subclassing.
Changes:

  • class is public
  • append methods changed to protected
  • added 3 new append helper methods to keep the do methods private

As an alternative to this limited update, I'm happy to make some (strictly optional) modification to the main Serializer, by adding public methods to override the default behavior. For example:

  • Add special handler for HtmlAnchor to include the target URL in the output
  • Possibly an alternate handler for HtmlTable (not sure yet)

That said, it seemed starting with this subclass compatible Serializer might be the best first step.

1 Attachments

Discussion

  • Rob Kodey

    Rob Kodey - 2017-07-31

    Woops - that description didn't turn out well at all, and no way to edit it I guess. Trying again here:


    I'm suggesting updating some of the method access modifiers to allow for easier subclassing.
    Changes:
    1) class is public
    2) append methods changed to protected
    3) added 3 new append helper methods to keep the do methods private

    As an alternative to this limited update, I'm happy to make some (strictly optional) modification to the main Serializer, by adding public methods to override the default behavior. For example:

    • Add special handler for HtmlAnchor to include the target URL in the output
    • Possibly an alternate handler for HtmlTable (not sure yet)

    That said, it seemed starting with this subclass compatible Serializer might be the best first step.

     
  • RBRi

    RBRi - 2017-08-28
    • status: open --> accepted
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2017-08-30

    Have applied your patch and done some additional refactoring. Please have a look.

     
  • RBRi

    RBRi - 2017-08-30
    • status: accepted --> pending
     
  • RBRi

    RBRi - 2017-12-02

    No response, i guess you are fine with this.

     
  • RBRi

    RBRi - 2017-12-02
    • status: pending --> closed
     

Log in to post a comment.