Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jaynarayan89/87bfad6f4203088f8d513fe30e0c2041 to your computer and use it in GitHub Desktop.
Save jaynarayan89/87bfad6f4203088f8d513fe30e0c2041 to your computer and use it in GitHub Desktop.
thoughts about decorator pattern
lorenzo [9:27 PM]
I sued decorator for a bunch of stuff, but where it is more obvious is in the result set
the statement object is a decorator for pdo statement
the code that casts the results to the right type (int, dates…) is a decorator of the statement
the code that converts the rows to entities is a decorator of the statement…
formatResults is a decorator of the result set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment