Tag: oop
Method Chaining Pitfalls & Alternatives
Method chaining (fluent interfaces) improves readability for builders but creates debugging difficulties, encourages temporal coupling, and can hide null returns.
2mo ago
quality intermediate
Memento Pattern
PHP 5.0+
A behavioural pattern that captures an object's internal state and stores it externally so it can be restored later — enabling undo, snapshots, and versioning without exposing internals.
3mo ago
quality intermediate
Magic Methods (__get, __set, __call…)
PHP 5.0+
Special PHP methods invoked automatically in response to language events — property access, method calls, serialisation, and more.
3mo ago
php intermediate
Mediator Pattern
PHP 5.0+
Centralises complex communications between multiple objects into a single mediator object, reducing direct dependencies between colleagues.
3mo ago
quality intermediate
Middle Man
A class that does little more than delegate every method to another object — an unnecessary layer of indirection.
3mo ago
quality intermediate