Tag: oop
Abstract readonly Properties
PHP 8.4+
PHP 8.4 allows abstract readonly properties in abstract classes and interfaces — defining that implementations must provide a readonly property of a specific type.
2mo ago
php advanced
Abstract Factory Pattern
PHP 5.0+
Creates families of related objects ensuring they are used together consistently without mixing implementations.
3mo ago
quality intermediate
Active Record Pattern
PHP 5.0+
A design pattern where a database row is wrapped in an object that includes both the data and the persistence logic — the object knows how to save, update, and delete itself.
3mo ago
quality intermediate
Asymmetric Visibility (PHP 8.4)
PHP 8.4+
PHP 8.4 allows separate read and write visibility on properties — public(get) private(set) means anyone can read but only the class can write.
3mo ago
php intermediate
abstract (Classes & Methods)
PHP 5.0+
1
PHP keyword that prevents instantiation and enforces method implementation in subclasses.
3mo ago
php beginner
Abstract Classes
PHP 5.0+
4
Non-instantiable classes that define shared behaviour and enforce subclasses to implement required methods.
3mo ago
php intermediate
Converts the interface of a class into another interface clients expect, allowing incompatible interfaces to work together.
3mo ago
general intermediate
Advanced Python Dataclasses
Python 3.7+
1
Dataclasses auto-generate __init__, __repr__, __eq__ from field declarations — advanced features include frozen (immutable), slots (memory-efficient), and field metadata.
3mo ago
python intermediate
Domain objects with only data (getters/setters) and no behaviour — business logic scattered across service classes.
3mo ago
quality advanced
Anonymous Classes (PHP 7.0)
PHP 7.0+
2
Classes without a name, defined inline with new class — useful for one-off implementations and test doubles.
3mo ago
php intermediate
Asymmetric Visibility (PHP 8.4)
PHP 8.4+
PHP 8.4 asymmetric visibility lets you set different access levels for reading and writing a property — public(get) protected(set) — without getter/setter methods.
php intermediate