4.1 Demonstrate ability to write code using core and Object Oriented PHP

Review the differences between an abstract class and a base class. Review PHP constants.

Base Class

A base class creates consistent reusable code. When you extend a class the new subclass inherits all methods from the parent class.

Abstract Class

An abstract class provides a template for inheriting base class methods. Abstract classes cannot be instantiated

Interface

An interface provides methods but does not define how to use the methods.

PHP Constants

PHP constants are global variables and must always be declared in UPPERCASE according to Drupal coding standards.

Other Resources

Last updated