code: public function extend($module): void
      {
          if (is_object($module) || class_exists($module)) {
              $this->modules[] = $module;
          } else {
              throw ApplicationException::forInvalidModule($module);
          }
      }
docs: Allows for application extension by modules.
  Module can be any valid object or class name.
  
  @param $module