You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Developing Transphporm becomes increasingly complex because of action-at-a-distance. Various places amend a single \DomDocument instance. It gets passed in to various methods in different ways (e.g. some as a reference to an element, which is then modified).
The problem with this approach is that development becomes complex. It's not clear what happens where.
I've added some preliminary work to make every class in the project immutable. All changes to the DomDocument will now happen in the \Transphporm\Document class which wraps the \DomDocument object.
The idea is that anything that changes the document is given the immutable instance and returns the updated document e.g.
The will remove (or at least help reduce) the effect of changes happening to a \DomDocument object somewhere else in the library, make development and testing easier.
The text was updated successfully, but these errors were encountered:
Developing Transphporm becomes increasingly complex because of action-at-a-distance. Various places amend a single
\DomDocument
instance. It gets passed in to various methods in different ways (e.g. some as a reference to an element, which is then modified).The problem with this approach is that development becomes complex. It's not clear what happens where.
I've added some preliminary work to make every class in the project immutable. All changes to the DomDocument will now happen in the
\Transphporm\Document
class which wraps the\DomDocument
object.The idea is that anything that changes the document is given the immutable instance and returns the updated document e.g.
The will remove (or at least help reduce) the effect of changes happening to a \DomDocument object somewhere else in the library, make development and testing easier.
The text was updated successfully, but these errors were encountered: