Skip to content
academia.sh

Unit 01 of 02

Object Model

Classes and objects, inheritance and abstract classes, interfaces, traits, static members, magic methods and type declarations — each as a mechanism that decides what the code using a definition experiences when that definition changes.

Published Updated

Lessons

  1. 01 Classes and Objects What the code that uses a class experiences when a name inside the class changes: a private property, a public property, and a consumer that writes to a public property; the four reaches that measure where a change goes. 2 min read
  2. 02 Inheritance and Abstract Classes A change inside a parent class shifting the result of a subclass implicitly, an added abstract method stopping the subclasses, and the same counter built with composition leaving the same change in place. 1 min read
  3. 03 Interfaces A class that implements an interface failing to declare when a method is added to the interface, the interface as a type and instanceof, and the same addition staying in place in an abstract class with a body. 1 min read
  4. 04 Traits Sharing methods between classes with a trait, resolving a conflict with insteadof and as, and the consumer stopping when a method of the same name is added to a trait it uses. 1 min read
  5. 05 Static Members and Constants Properties, methods, and constants bound to the class, hiding the constructor behind a static factory method, and which changes stop the consumer. 1 min read
  6. 06 Magic Methods The __get, __set, __isset, __call, and __toString methods, resolving a name that is read through a method, and the implicit and breaking results the consumer meets when that resolution changes. 1 min read
  7. 07 Type Declarations Parameter, return, and property types, ?int and the union type, and which inputs stop the consumer when a type is added to a parameter. 1 min read

Start typing to search.

↑↓ ↵ Esc navigate · open · close