Pages

Monday, October 21, 2013

PHP abstract classes

  • Abstract classes cannot be instantiated
  • A class must be declared as abstract if any of its method is abstract
  • Methods defined as abstract must only declare its signature
  • When inheriting from abstract class the child must define all the abstract methods with the same visibility or lower
  • The type and arguments must match the signature

No comments: