You are here

protected function Modernizr::__construct in Modernizr 7.2

@constructor

This function processes the cookie data.

File

./modernizr.inc, line 35

Class

Modernizr
Modernizr class.

Code

protected function __construct() {
  if (empty($_COOKIE['modernizr'])) {
    throw new ModernizrCookieNotSetException();
  }
  $data = $_COOKIE['modernizr'];
  $data = drupal_json_decode(html_entity_decode($data));
  $this->features = array();
  $this
    ->processData(NULL, $data);
}