You are here

function CourseHandler::__construct in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseHandler.inc \CourseHandler::__construct()
  2. 7 includes/CourseHandler.inc \CourseHandler::__construct()
4 calls to CourseHandler::__construct()
Course::__construct in includes/course.core.inc
CourseObject::__construct in includes/course_object.core.inc
Construct a course object from a database record.
CourseObjectAccess::__construct in includes/course.core.inc
CourseReport::__construct in includes/course.core.inc
5 methods override CourseHandler::__construct()
Course::__construct in includes/course.core.inc
CourseObject::__construct in includes/course_object.core.inc
Construct a course object from a database record.
CourseObjectAccess::__construct in includes/course.core.inc
CourseObjectFulfillment::__construct in includes/course_object.core.inc
Construct the fulfillment object.
CourseReport::__construct in includes/course.core.inc

File

includes/course.core.inc, line 20
course.core.inc File for main Course class.

Class

CourseHandler
@file course.core.inc File for main Course class.

Code

function __construct($config = array()) {
  foreach ($config as $key => $value) {
    if ($key === $this->serializedField && !is_array($value)) {
      $data = unserialize($value);
      if (is_array($data)) {
        foreach ($data as $key2 => $value2) {
          $this
            ->setOption($key2, $value2);
        }
      }
    }
    else {
      $this
        ->setOptions((array) $config);
    }
  }
}