Drupal 8  8.0.2
Objected-oriented programming conventions

PSR-4, namespaces, class naming, and other conventions.

A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits (which are loosely referred to as "classes" in the rest of this topic). The following conventions and standards apply to this version of Drupal: